The WooCommerce Email Settings allow you to add custom recipients only for New Order, Cancelled Order, Failed Order and all admin-only emails.
But what if you want to add an email recipient to a customer email e.g. the Completed Order one? For example, you need to send it to your dropshipper. Also, you might want to add a To: recipient, or instead a cleaner Cc: or safer Bcc:.
Either way, a simple snippet allows you to achieve that (and more, if you consider WooCommerce conditional logic). Enjoy!
PHP Snippet 1 : Add To: Recipient to a Customer WooCommerce Email
Note – to target other WooCommerce order emails see here to find the “EMAIL_ID”: https://businessbloomer.com/woocommerce-add-extra-content-order-email/ and then change the filter in the snippet below to “woocommerce_email_recipient_EMAIL_ID“.
In this case I’m targeting the “customer_completed_order” hence I’m using “woocommerce_email_recipient_customer_completed_order“.
/**
* @snippet Add To: Recipient @ WooCommerce Completed Order Email
* @how-to businessbloomer.com/woocommerce-customization
* @author Rodolfo Melogli, Business Bloomer
* @compatible WooCommerce 7
* @community https://businessbloomer.com/club/
*/
add_filter( 'woocommerce_email_recipient_customer_completed_order', 'bbloomer_order_completed_email_add_to', 9999, 3 );
function bbloomer_order_completed_email_add_to( $email_recipient, $email_object, $email ) {
if ( is_admin() ) return $email_recipient;
$email_recipient .= ', your@email.com';
return $email_recipient;
}
PHP Snippet 2: Add Cc: / Bcc: Recipient to a Customer WooCommerce Email
/**
* @snippet Add Cc: or Bcc: Recipient @ WooCommerce Completed Order Email
* @how-to businessbloomer.com/woocommerce-customization
* @author Rodolfo Melogli, Business Bloomer
* @compatible WooCommerce 7
* @community https://businessbloomer.com/club/
*/
add_filter( 'woocommerce_email_headers', 'bbloomer_order_completed_email_add_cc_bcc', 9999, 3 );
function bbloomer_order_completed_email_add_cc_bcc( $headers, $email_id, $order ) {
if ( 'customer_completed_order' == $email_id ) {
$headers .= "Cc: Name <your@email.com>\r\n"; // delete if not needed
$headers .= "Bcc: Name <your@email.com>\r\n"; // delete if not needed
}
return $headers;
}
Mini-Plugin: Business Bloomer WooCommerce Add To: Cc: Bcc: Email Recipients
You don’t feel confident with coding? You need more control over your WooCommerce email recipients? You don’t want to purchase yet another bloated, expensive plugin? Great!
Business Bloomer WooCommerce Add To: Cc: Bcc: Email Recipients is a mini WooCommerce plugin, without the usual hassles. One feature. Lifetime license. No annoying subscriptions. 1 plugin file. A few lines of code. No banners. No up-sells. No WP notifications. Use it on as many websites as you like. Lifetime support. 1-page documentation. A single and easy admin dashboard.
Screenshot of the settings:
Quick demo? Here it is:
As you can see the settings are pretty straight forward. Simply add a comma separated list of email To: CC: and/or BCC: recipients to any active WooCommerce email. See the magic happen. Simple!
This looks like the solution i’m looking for—nice! I am looking for specifically a way to cc: certain parties for when ‘order notes’ are added to an order. So I am curious if this has been tested with the Woo hook
, or if you believe using that hook in the filter part of the snippit?
Hello Seth, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Will this also work on woocommerce email extensions
1. woocommerce subscriptions
2. Reminders for woocommerce subscriptions – https://woocommerce.com/products/email-reminders-for-woocommerce-subscriptions/
If these custom emails are “properly registered in the WooCommerce way”, yes. If they are simple notifications that don’t use any WooCommerce code and only wp_mail, it won’t work.
Your WooCommerce Add To: Cc: Bcc: Email Recipients Mini-Plugin is great, very helpful, but it would be even more helpful if a customer could be added as a recipient to emails that by default are addressed to admin. I mean, I’d like customers to receive emails such as Cancelled Order, so in cases of cancelled orders customers are automatically notified.
Thank you!
Thank you! And I’ve just released the new version, where you have these new placeholders: {customer}, {admin}. Simply enter {customer} in the recipient settings, and they will receive the admin-only email!
Hi Rodolfo
I use the sendinblue SMTP service on my site, and unfortunately this snippet doesn’t work.
Could you give me some hints on how to solve it?
Ciao Fabio, no idea, sorry
Thanks, what about something more specific like: wcs_email_processing_renewal_order for WooCommerce subscriptions plugin, any way to add it there?
Hello Rai, you will need to find out the email ID defined by the custom plugin. In that case (WooCommerce Subscriptions), it should be “customer_processing_renewal_order” (untested)
How would I apply this theory to a WordPress email, for example, the reset password email from the admin side does not log when using the password customer_reset_password Email ID
If you have WooCommerce installed, WordPress should use the WooCommerce reset email out of the box. Is this not the case?
Note this to target multiple email types, list here: https://www.businessbloomer.com/woocommerce-add-extra-content-order-email/
PS I can confirm
Thank you!
Doesn’t work anymore unfortunately!
Thanks for your feedback Piero. Can you please try again after disabling all plugins but WooCommerce and switching theme temporarily (and moving the code to your new theme functions.php)?
I tried this code to add a Bcc email address to my WooCommerce Completed order emails, but instead of working it prevented Completed order emails to be sent altogether !
Do you have any idea why ? What is the 9999, 3 at the end of the add_filter function ? Could it be the reason ?
First is priority and the second number os the number of parameters – no they are not the reason and not even my snippet, because it works on my end.
Either temporarily switch theme and all plugins but Woo to see if the function works, otherwise enable WP_DEBUG and see what’s the error code and description
Thanks a lot for this snippet, Rodolfo! It works perfectly!
May I ask if there is a way to add a second cc or bcc email address?
Thanks in advance
Thanks Rafael! Simply add as many lines as you wish:
Awesome!! Thanks heaps for the help!
You’re welcome
Hi Rodolfo,
Thanks a million, this is just what I was looking for! What if I need to CC a dynamic email address, something that changes from customer to customer? Like the primary contact person of that customer. I would use Advanced Custom Fields to input this address to the customer and then… use
instead of plain email address?
Hi Mikko, I guess you’ll need to store that info inside the $order, so you can retrieve it afterward. Hope this helps!
This looks great although I can’t seem to get it to work? I want to add another recipient to the refunded email, as a BCC. This is my snippet, do you have any thoughts?
I apologise, my code wasn’t completely pasted!
Yep, try with this new version
Hey there, I don’t understand why but doesn’t work with paypal payments, any ideas?
Not sure I understand. This is for WooCommerce emails
Thanks,
It’s really helpful.
Great!
I have this question regarding the subject. My new order notifications in main language, in the email is not showing the multiple emails that will receive that notification. I belive its all in bcc maybe. Thats fine to me. But in the secondary language all the emails are showing. And I dont know why. For exemple, i dont want that my client knows that my personal email will receive new order notifications. Main language is fine, secondary language all emails are visible.
How is that possible? I cant find any options to change that.
Thanks
Not sure, do you use WPML? Maybe you need to change the settings for both languages
Is it possible to email a new order to the product author in the recipient field
Yes
Hello
I am trying to notify the admin of the site when e membership expires or is about to expire. I use woocommerce membership by skyverge. Does the hook “woocommerce_email_headers” work with this plugin as far as you know? I have tried the following
it adds for the first 2 emails but not the membership, i think i can’t get right the email ID :/
Hi Sara, have you asked Skyverge?
Would this work for Cutomer_note email? Woocommerce sends out an email when a customer note is added to an order.
Sure! Here’s how to find the correct email ID: https://www.businessbloomer.com/woocommerce-add-extra-content-order-email/
Works great!
Take note Name in “Cc: Name ” or “Bcc: Name ” has to be one word eg. Khidmah-Sales. I tried with Khidmah Sales and it doesn’t work.
Nice
This is really helpful thanks.
If anyone reading this isn’t comfortable editing code, then we have released a plugin called WooCommerce Multiple Email Recipients which lets you send the customer order-related emails to multiple email addresses – https://barn2.co.uk/wordpress-plugins/woocommerce-multiple-email-recipients. It would be great if you could mention this in the article for people who would like a non-code based solution.
Thanks!
Well done Katie!
Thanks for this! Can you please confirm if this looks right for adding a CC and BCC to the ‘processing order’ email? I wasn’t sure especially if I need woocommerce_email_recipient_’customer_processing_order or woocommerce_email_headers as the first filter. Thank you for your time.
Looks good to me Amanda
Just use the BCC and it is working fine! Thank you
Cool
Hi,
thanks it is still working!
thanks
Nice!
hey Rodolfo,
im trying to add a cc for the “processing” status.
Can you help, what should the code be in order the get this working
What’s the code you tried with?
Me too!, ads bcc but not cc
Weird. What’s the code you’re using?
I think I caught the issue, $email_id instead of $email->id.
Yes!
Rodolfo, you are a tremendous resource! Thank you so much. I have a similar issue. I am trying to add bcc to customer invoice email using “woocommerce_email_recipient_customer_invoice” with ‘customer_invoice’ as the $email->id in the condition. Doesn’t send the bcc.
Our client has requested that even though they recieve a ‘New Order’ email when a customer buys something they also want to receive the customer invoice email to. Is this possible, i have tried using the code above but changed customer_completed_order to customer_invoice, but it doesn’t seem to work.
Hey Patrick! So you used “woocommerce_email_recipient_customer_invoice”?
my client is requesting the same thing
What’s the code you tested with?