Jump to content

Hook not working


Recommended Posts

Hello all!

is there anyone know this problem?

yyFjkKD.png

 

function mincoding_invoice_paid($vars)

{

$from = 'mymail@gmail.com';

$subject = "mincoding_invoice_paid";

$message = 'The test: invoiceid - ' . $vars['invoiceid'] . "<br/>";

$message = wordwrap($message, 70);

mail("mymail@gmail.com",$subject,$message,"From: $from\n");

}

add_hook("InvoicePaid",10,"mincoding_invoice_paid");

 

i try to change invoice status to Paid by not working.it work if i test with InvoiceCreated hook. i don't know why, pls help me!

Link to comment
Share on other sites

If an invoice is to be marked as paid, then it's expected for it to receive a payment... and that's the way it should be.

 

Adding payment to any invoice (full amount) will mark the invoice as paid and it will trigger everything else related to that invoice status.

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