rustynoel Posted September 18, 2015 Share Posted September 18, 2015 Hello, Please help to understand. I want to make hook which do something with Hooks:InvoicePaymentReminder for example <?php function mytesthook($vars){ ob_start(); echo "FUNCTION STARTED\n"; var_dump($vars); echo "THIS IS A TEST"; $output = ob_get_clean(); logActivity($output); } add_hook('InvoicePaymentReminder', 1, 'mytesthook'); ?> However, nothing was added in log activity when invoice reminder sent, but when I use other hook for test like shown below everything is working fine. The data was added to activity <?php function mytesthook($vars){ ob_start(); echo "FUNCTION STARTED\n"; var_dump($vars); echo "THIS IS A TEST"; $output = ob_get_clean(); logActivity($output); } add_hook('AdminLogin', 1, 'mytesthook'); ?> Where is my mistake? Please help. 0 Quote Link to comment Share on other sites More sharing options...
rustynoel Posted September 21, 2015 Author Share Posted September 21, 2015 Hello, Nobody? ( 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 21, 2015 Share Posted September 21, 2015 this may work function mytesthook($vars){ logActivity("InvoiceID: ".$vars['invoiceid']); } add_hook('InvoicePaymentReminder', 1, 'mytesthook'); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.