When there is an order being made in Woocommerce, email will be send to administrator. Some of you might want to add additional recipients to receive these email for future reference or as notification. Fortunately, Woocommerce come with a handy filter that can be use to override the default email headers.
I’ve this function that allow you to send the bcc email according to different order status. Hope this function give you more flexibility in sending email according to different order status.
How to Bcc all order email to multiple recipients in Woocommerce according to order status:-
Advertisements
- Open your theme functions.php and copy and paste the code below at the bottom of the file:-
/** * Custom Woocommerce Email Headers * add multiple bcc recipients */ function techie_custom_wooemail_headers( $headers, $object ) { // replace the emails below to your desire email $emails = array('first@emailaddress.com', 'second@emailaddress.com'); switch($object) { case 'new_order': case 'customer_processing_order': case 'customer_completed_order': case 'customer_invoice': $headers .= 'Bcc: ' . implode(',', $emails) . "\r\n"; break; default: } return $headers; } add_filter( 'woocommerce_email_headers', 'techie_custom_wooemail_headers', 10, 2);
- Now you can test to send some email in the Order section and you should be able to receive the email according to your settings
Related posts:
How to block customer from accessing WP Admin in WordPress
How to change 'Out of Stock' text in Woocommerce
Woocommerce: Behaviour of each payment method during checkout
How to add native menu support in your WordPress theme?
ContactForm7 - How to prevent user from double click on the submit button?
WordPress WP-Cache with GZip Compression enable
WordPress: add javascript event after widget save
Free WordPress 2 Columns Kubrick Plain Theme - Red
Share this with your friends:-
How do we get the “notes” updated emailed? would it be ‘customer_note’ ?
how do I make e mails specified for special products. Lets say I only want send a copy of new order’s mail for some products which is in different category?
Sorry, not really sure for that but
you can modify the code to log the $object value into text file.
then u can try to cancel an order and check the text file for value.
Hope this helps. Thanks.
In case of cancel order what is $object