Douglas Ruiz Posted January 5, 2018 Share Posted January 5, 2018 Where i can hook Invoice Creation of Cron Job? Because i hooked add_hook("InvoiceCreation", 1, "MyFunction"); but it only work on first invoice when purchase the product first time. Others invoices don't pass on this hook. So my question is how hook InvoiceCreateion who run on Cron Job. Link to comment Share on other sites More sharing options...
sentq Posted January 6, 2018 Share Posted January 6, 2018 tried "InvoiceCreated" instead? from the documentation https://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicecreation Quote InvoiceCreation Executes as an invoice is being created in the admin area Link to comment Share on other sites More sharing options...
Douglas Ruiz Posted January 7, 2018 Author Share Posted January 7, 2018 Yes i tried, but i need it to work when cron job generate invoices. And on InvoiceCreation dont work on cron job. Link to comment Share on other sites More sharing options...
Douglas Ruiz Posted January 7, 2018 Author Share Posted January 7, 2018 I mean on this: Created Invoice - Invoice ID: 262 System 05/01/2018 09:00 Automated Task: Starting Invoices Link to comment Share on other sites More sharing options...
sentq Posted January 7, 2018 Share Posted January 7, 2018 try https://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicecreated Link to comment Share on other sites More sharing options...
Recommended Posts