nodkz Posted June 27, 2011 Share Posted June 27, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted June 28, 2011 WHMCS Support Manager Share Posted June 28, 2011 It's not possible, an invoice needs to be paid in order to trigger the automation. 0 Quote Link to comment Share on other sites More sharing options...
nodkz Posted June 29, 2011 Author Share Posted June 29, 2011 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)... 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.