Replies: 0
Hello.
I have this line of code in my plugin:
add_action( ‘woocommerce_order_status_completed’, ‘hh_function_name_removed’, 10, 1 );
and a function
hh_function_name_removed($order_id)
{
$logfile = “/home/myname/test.log”;
file_put_contents($logfile, date(“r”).”\n”, FILE_APPEND);
return;
}
But the function seems to be never run.
I have tried “woocommerce_order_status_completed” and “woocommerce_payment_complete” with no success.
Any ideas on how to get a code run after a completed order in woocommerce?
Thanks.
edit: Oh and i mean when the customer goes back from the payment gateway to the woocommerce site, then should the plugin code be run.
- This topic was modified 3 minutes ago by heikkiwaan.