WooCommerce: Add To: Cc: Bcc: Email Recipients

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!

In this example, I’ve added a second To: recipient to the Customer Completed Order WooCommerce emails

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        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @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        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @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!

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Add Content to a Specific Order Email
    Customizing WooCommerce emails via the WordPress dashboard is not easy and – sometimes – not possible. For example, you can’t edit or add content to them unless you’re familiar with code. Well, here’s a quick example to learn how to add content to any WooCommerce default order email. In this case study, our goal is […]
  • WooCommerce: How to Add a Custom Checkout Field
    Let’s imagine you want to add a custom checkout field (and not an additional billing or shipping field) on the WooCommerce Checkout page. For example, it might be a customer licence number – this has got nothing to do with billing and nothing to do with shipping. Ideally, this custom field could show above the […]
  • WooCommerce Visual Hook Guide: Emails
    WooCommerce customizers: the Visual Hook Guide is back! Here’s a visual HTML hook guide for the WooCommerce Emails. This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations. Let me know in the comments if this […]
  • WooCommerce: Remove Link to Product @ Order Table
    There is a slightly annoying thing on the WooCommerce Thank-You Page and WooCommerce emails. Users looking at the order table can actually click on the Products they just purchased and abandon the page before taking the action you want them to take (see image below). So, I coded a simple PHP snippet to remove such […]
  • WooCommerce: Add CSS to Order Emails
    Unlike your WordPress theme, you can’t just add CSS to your style.css in order to customize the look of the WooCommerce emails. This handy PHP snippet is therefore the only viable solution. It’s a little tricky but once you get the idea, adding CSS to Order Emails is a breeze.

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

58 thoughts on “WooCommerce: Add To: Cc: Bcc: Email Recipients

  1. 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.

    1. 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!

  2. 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?

    1. Ciao Fabio, no idea, sorry

  3. Thanks, what about something more specific like: wcs_email_processing_renewal_order for WooCommerce subscriptions plugin, any way to add it there?

    1. 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)

  4. 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

    1. If you have WooCommerce installed, WordPress should use the WooCommerce reset email out of the box. Is this not the case?

  5. Note this to target multiple email types, list here: https://www.businessbloomer.com/woocommerce-add-extra-content-order-email/

    /**
     * @snippet       Add Cc: or Bcc: Recipient @ WooCommerce Completed Order Email
     * @how-to        Get CustomizeWoo.com FREE
     * @author        Rodolfo Melogli
     * @compatible    WooCommerce 5
     * @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 ) {
       $email_ids = array (
            'new_order',
            'customer_completed_order',
            'customer_processing_order',
    
        );
        if ( in_array( $email_id, $email_ids ) ) {
            $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;
    }
    
    1. PS I can confirm

       * @compatible    WooCommerce 6
  6. Doesn’t work anymore unfortunately!

    1. 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)?

  7. 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 ?

    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 .= "Bcc: Support <support@mydomain.com>\r\n"; // delete if not needed
        }
        return $headers;
    }
    
    1. 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

  8. 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

    1. Thanks Rafael! Simply add as many lines as you wish:

      $headers .= "Cc: Name <your@email.com>\r\n";
      $headers .= "Cc: Name2 <your2@email.com>\r\n";
      
      1. Awesome!! Thanks heaps for the help!

  9. 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

    the_field('primary_contact')

    instead of plain email address?

    1. Hi Mikko, I guess you’ll need to store that info inside the $order, so you can retrieve it afterward. Hope this helps!

  10. 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?

    1. I apologise, my code wasn’t completely pasted!

      /**
       * @snippet       Add Cc: or Bcc: Recipient @ WooCommerce Refunded Order Email
       * @how-to        Get CustomizeWoo.com FREE
       * @author        Rodolfo Melogli
       * @compatible    WooCommerce 4.6
       */
       
      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 ( $email_id  == 'customer_refunded_order' ) {
              $headers .= "Bcc: ChrisMollard<email@email.com>" . "\r\n"; // del if not needed
          }
          return $headers;
      }
      
      1. Yep, try with this new version

  11. Hey there, I don’t understand why but doesn’t work with paypal payments, any ideas?

    1. Not sure I understand. This is for WooCommerce emails

  12. Thanks,
    It’s really helpful.

  13. 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

    1. Not sure, do you use WPML? Maybe you need to change the settings for both languages

  14. Is it possible to email a new order to the product author in the recipient field

  15. 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

    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 ) || ( 'customer_refunded_order' == $email_id ) || ( 'user_membership_ended' == $email_id ) ) {
            $headers .= "Bcc: Me <myemail@test.com>" . "\r\n"; // del if not needed
        }
        return $headers;
    }

    it adds for the first 2 emails but not the membership, i think i can’t get right the email ID :/

    1. Hi Sara, have you asked Skyverge?

  16. Would this work for Cutomer_note email? Woocommerce sends out an email when a customer note is added to an order.

  17. Works great!

    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_processing_order' == $email_id ) {
            $headers .= "Cc: Name <sales@ourcompany.com>" . "\r\n"; // del if not needed
            $headers .= "Bcc: Name <me@ourcompany.com>" . "\r\n"; // del if not needed
        }
        return $headers;
    }
    

    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.

    1. Nice

  18. 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!

    1. Well done Katie!

  19. 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.

    
    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_processing_order' == $email_id ) {
            $headers .= "Cc: Sales <sales@ourcompany.com>" . "\r\n"; // del if not needed
            $headers .= "Bcc: Me <me@ourcompany.com>" . "\r\n"; // del if not needed
        }
        return $headers;
    }
    
    1. Looks good to me Amanda

  20. Just use the BCC and it is working fine! Thank you

    1. Cool

  21. Hi,
    thanks it is still working!
    thanks

    1. Nice!

  22. 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

    1. What’s the code you tried with?

      1. Me too!, ads bcc but not cc

        1. Weird. What’s the code you’re using?

  23. I think I caught the issue, $email_id instead of $email->id.

    1. Yes!

  24. 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.

    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 ( $email->id == 'customer_invoice' ) {
            $headers .= "Bcc: Name <example@test.com>" . "\r\n"; // del if not needed
        }
        return $headers;
    }
    
  25. 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.

    1. Hey Patrick! So you used “woocommerce_email_recipient_customer_invoice”?

    2. my client is requesting the same thing

      1. What’s the code you tested with?

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *