I’m not getting my logic hook to call the class/method for some reason.
I’m SURE I’m doing something really stupid…not a highly seasoned OOP PHP guy.
In general, I’m trying to run some custom code when an Account record is saved. (Essentially updating a field in the Account record with some external data.)
For some reason, the logic_hook.php file executes, but the accountsDomainExp.php file ‘seems’ not to fire.
Can anyone point me in the right direction?
logic_hooks.php in custom/accounts folder:
$hook_array[‘after_save’][] = Array(81, ‘updateDomainExpirationDate’, ‘custom/modules/Accounts/accountsDomainExp.php’,‘accountsDomainExp’, ‘updateDomainExpDate’);
file_put_contents(‘custom/modules/Accounts/hookFile.txt’, "Before Method Called!! " . date(“l jS \of F Y h:i:s A”) . “\n”, FILE_APPEND);
I’m Using the file_put_contents function just to see if it’s firing…and THIS ONE Above “IS” actually firing (3 times actually…which may be a separate issue all togehter.)
**Class file - accountsDomainExp.php **
I’m using the file_put_contents as a way to ‘see’ if/where the code is firing…BUT, I’m simply NOT getting any of them to fire.
Sorry for the newby question…
Thanks for any point in the right direction!!