Site icon Hip-Hop Website Design and Development

woocommerce_email_recipient_new_order not triggered

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:

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?