-
Content Count
568 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout brianoz

-
Rank
Level 2 Member
Recent Profile Visitors
1354 profile views
-
I am Looking for WHMCS developers for custom module
brianoz replied to noordev's topic in Service Offers & Requests
Surely a better fix would be to move to a transactional email provider that can cope with more than 50 emails at once? Or talk to mailgun and see if they can increase rate limits? (maybe introduce a 1 second sleep between emails, etc). Developing a queuing solution for emails might help, but it's a bandaid approach that just makes things more complex, which usually causes issues down the track. -
Autopay / Recurring Charge for My WHMCS License?
brianoz replied to Robert West's question in Pre-Sales Questions
Yes, there's a reply above, from December (3+ months ago). You might want to ask a question as a new post if you have a related issue, or be more specific about what you were expecting. Cheers! -
CCPA and GDPR pop up on WHMCS?
brianoz replied to justlearning's topic in Installation, Upgrade, and Import Support
What specific functionality are you talking about? The more specific you are, the more likely you'll get a meaningful response. (as it is, this could mean absolutely anything) -
Redirect non-logged in users to custom login page
brianoz replied to samuelyip74's topic in Developer Corner
There are a bunch of possible reasons; first thing I'd check is whether the login page URL has changed, or whether the hook has changed. -
why are you still using WHMCS after what they did?
brianoz replied to PixelPaul's topic in General Discussion
To make sure you're comparing appless with apples, you might want to do a dry run to see how long it actually takes for you to replace WHMCS with a manual process, or takes to move to a new open source system. Don't forget to include things like domain renewals, auto-suspension if they don't pay, and some sort of reasonable and robust support system. My guess is you'll find it takes way more time than you'd think, but YMMV. -
I'm sorry to partly disagree, but for a WHMCS hook you do need to call the add-hook function to get the code to execute. The code will be READ and loaded by virtue of it being in the custom-hook file (easy to verify by simply including die("---hook code executed---"); in the file!) but if you define a function that function will never get called. Alternatively, you could simply call the function directly, although that's considered bad practice, as you generally want hooks to only run at certain points in WHMCS' execution. If the module you are loading checks for and then calls a PHP function called "preXeroSync()", this is NOT a WHMCS hook, and you are completely correct that it doesn't need a WHMCS add_hook() call to trigger it. The reason it's not running would be one of these: The function isn't defined with the correct name, or namespace, or isn't visible somehow to the module code when it runs. I'd try commenting out the namespace to see if it works without that. The function isn't defined early enough to be visible to the Edgehosting code when it needs to see it. It might be that you need to move the source code to the main hook folder and see if that works. I realize this is way too late to be helpful, but just want to make sure people don't get confused. Looks to me like you had the second case, where it wasn't a WHMCS hook at all; apologies for not catching earlier.
-
If you use hook code to define a function, that function will never be called unless you either call it in the same file, or use a module hook. In your code, you define a function but it is never called. Pretty sure here that you've misunderstood how module hook code works. The file is read, and it defines functions which are then connected via add_hook() calls. No sweat, this is complex if you're not used to it. 🙂
-
Looks like you left out the add_hook() call to actually cause the hook to be added somewhere. As you have it, you're defining a function but it never gets called. add_hook("InvoiceCreation", 9999, "preXeroSync"); except that the hook on which you want this to run probably isn't InvoiceCreation, so you'll need to work out what the correct hook name is for your code to work.
-
The commit causes the changes made by localAPI to become permanent. Changes made after beginTransaction() are otherwise just temporary. If you left out the beginTransaction() method call it would also work. The idea of using a transaction is that changes are rolled back if something goes wrong, and the assumption is that things did go wrong if you don't call the commit() method.
-
Also, worth adding a logActivity() call when there's a failure, like: logActivity("FAILED xyz - results are: " . print_r($results, 1)); At the moment you just have a log entry on success. Having log errors on failure might help you work out the problem. If you don't get an activity log error at all, that probably means your file isn't running. Make sure the file is mode 644 (rw-r--r--) and ends in .php. I'd also be checking for error log files being created, usually in the admin folder - they're always called "error_log", The following command can find those files anywhere on your site, if you change directory to be in the root of your WHMCS folder tree: find . -name error_log -print
-
You're missing committing the transaction at the end, just before you finish, so mysql is rolling all your changes back! $pdo->commit();
-
Our Collingwood premises, circa 2012
-
This is Goose. His main job was assessing credit risk; if Goose didn't like someone, they didn't get credit! He was always right!! 😎