I might like to customize the recipient of a brand new order in WooCommerce. Based on the documentation and varied examples I can do that like so:
perform wc_change_admin_new_order_email_recipient( $recipient, $order ) {
world $woocommerce;
//some code
return $recipient;
}
add_filter('woocommerce_email_recipient_new_order', 'wc_change_admin_new_order_email_recipient', 10, 2);
Nevertheless I can not get this filter to set off on my native development machine, nor can I get the positioning to ship order emails even with this code eliminated.
I’ve a working native debugger and the code stops at varied factors within the wc_email class, nonetheless it solely will get to the get_recipient perform once I change the admin electronic mail within the backend.
Here’s what I’ve tried:
- turned all different plugins off
- made positive WordPress, WooCommerce, Theme is updated
- Some theme information are proven as not updated, however admin-new-order.php doesn’t present on this listing
- admin-new-order.php in overrides folder is similar to WooCommerce model, so I’ve additionally tried to take away the override fully
- Misplaced password sends me an electronic mail on my native system (over the Web), so electronic mail supply is working
Is there a cron job used for supply of the admin new order electronic mail, if that’s the case how can I set off it?
Some other concepts?