Hello @ezoulou
Could you share a sample of the code you are using? I will pass it to our developers so we can take a closer look and help you resolve this.
Looking forward to your response.
Kind Regards,
Krystian
Thanks for your quick response.
Here is the code I use in a plugin :
// DOES work backend
add_action('woocommerce_order_status_completed','chronopost_return_check');
// SHOULD work frontend
add_action('woocommerce_payment_complete', 'chronopost_return_check');
function chronopost_return_check($order_id) {
...
}
Hello @ezoulou
It looks like this might be a bug on our end. The woocommerce_payment_complete hook should work, but in this case, it may not be triggering as expected.
As a workaround, we recommend using one of the woocommerce_order_status_ hooks, similar to how you’ve implemented it for woocommerce_order_status_completed. If the action needs to occur when the payment is captured, woocommerce_order_status_processing could be a good alternative.
In the meantime, I will log this issue for our developers so they can investigate and potentially include a fix in an upcoming update.
Let me know if you have any further questions.
Kind Regards,
Krystian
Thanks for your honest answer.
I already did try alternative hooks like woocommerce_order_status_processing or woocommerce_order_status_completed but without success.
Will try again and get back to you.
Regards