Jump to content

InvoicePaymentReminder Hook not working


zenk

Recommended Posts

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

Link to comment
Share on other sites

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)

😕

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated