zenk Posted July 30, 2018 Share Posted July 30, 2018 Hi all i learn to create sms hook. when i try to use InvoicePaymentReminder hook, it just dont fire. function Reminder($vars) { dd($vars); $invoiceid = $_POST['invoiceid']; $type = $_POST['type']; if($type == "reminder"){ $sendMessageRequest3 = new SendMessageRequest([ 'phoneNumber' => 'xxxxx', 'message' => 'reminder invoice created, number'.$invoiceid, 'deviceId' => 123 ]); SendSms($sendMessageRequest3); } } add_hook('InvoicePaymentReminder', 1, Reminder($args)); before come this, i used InvoiceCreation hook and InvoiceCreated hook, it works well dd($vars) result is NULL kindly help me. thanks 0 Quote Link to comment Share on other sites More sharing options...
zenk Posted August 2, 2018 Author Share Posted August 2, 2018 Anyone can help me on this? i cant get invoiceid in InvoicePaymentReminder hook 0 Quote Link to comment Share on other sites More sharing options...
iLsUkY Posted August 7, 2018 Share Posted August 7, 2018 Hi, have you try to deactivate and active your module. i had the same problem, after reactivate my custom module, with a hook, it worked. 0 Quote Link to comment Share on other sites More sharing options...
zenk Posted August 8, 2018 Author Share Posted August 8, 2018 On 8/7/2018 at 1:41 PM, iLsUkY said: Hi, have you try to deactivate and active your module. i had the same problem, after reactivate my custom module, with a hook, it worked. i have done that. module work when cron is run. but it doesnt fire when i press "Send Reminder" button in admin area at invoice page (invoices.php?status=Unpaid) 😕 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.