Jump to content

How disable email sending of invoices with 0.00$ amount.


nodkz

Recommended Posts

Good day.

 

Anybody can help me disable email sending for invoices with 0.00$ amount?

 

We have pay free domain transfer. So if customer order only this operation, he get 0.00$ amount invoice via email, and after that whmcs automaticaly mark this invoice as paided, and again send email abount confirmation of payment with 0.00$.

 

So we want to disable sending invoices and payment confirmation with 0.00$ amount.

How can I do this?

Link to comment
Share on other sites

I understand this (i don't want break the automation). I only want disable sending email to customer.

 

Now I can do this via class.smtp.php. Check message on "Total amount: 0.00$" and disable sending (but if template will be changed, I must change smpt class).

 

But more preferable method will be do that via HOOKS. For eaxample via InvoiceCreationPreEmail and InvoicePaid, where I can make following

 

function check_zero_amount_for_email_disabling($vars) {
  ... some code for determining zero amount ...
  if($is_zero_amount) {
      $GLOBAL['CONFIG']['NoInvoiceEmailOnOrder'] = 'on';
  }
}

 

But this does not work (( May be email sending already initialized, or get settings itself from db.

 

Disabling email via HOOKS will be very helpfull. Can you make such enchancement in future relises? For example make function disableEmailSending($bool = true)...

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