I have a custom field that contains an additional customer email account.
My idea is that when an order changes state WAIT, PENDING, PROCESSING or COMPLETED, it will reach the email of the one configured in this field.
Is this possible?
There is no problem that requires programming, but I don’t know what hook to use.
Thank you.
3
Answers
This might be quite useful:
https://www.skyverge.com/blog/add-woocommerce-email-recipients-conditionally/
I would take a look at the Considerations section.
You could use
woocommerce_order_status_changed
hook for example to notify someone each time an order change of status, like in this example:Code goes in functions.php file of your active child theme (or active theme). Tested and works
Add the follows code snippet in your active theme’s functions.php –