e-baker Posted May 17, 2017 Share Posted May 17, 2017 I am attempting to send invoice/client details to an external API every time an invoice is marked paid. I've created a simple script in an effort to capture the actual variables that are being passed. Here's the problem: it appears the hook is not firing no matter the invoice amount. add_hook('InvoicePaid', 5, function($vars) { $output = "This is the output of the file: \n"; $output .= print_r($vars, true); $file = fopen( "invoicepayment.log", "w" ); fwrite( $file, $output ); fclose( $file );}); I've tried searching but have had no success. 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.