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 5
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

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 .= ', [email protected]';
	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 5
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

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 <[email protected]>\r\n"; // delete if not needed
        $headers .= "Bcc: Name <[email protected]>\r\n"; // delete if not needed
    }
    return $headers;
}

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (delete "?>" if you have it there). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7.3.

If you think this code saved you time & money, feel free to join 14,000+ WooCommerce Weekly subscribers for blog post updates or 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

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.

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

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

  2. 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 <[email protected]>\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

  3. 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 <[email protected]>\r\n";
      $headers .= "Cc: Name2 <[email protected]>\r\n";
      
      1. Awesome!! Thanks heaps for the help!

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

  5. 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 protected]>" . "\r\n"; // del if not needed
          }
          return $headers;
      }
      
      1. Yep, try with this new version

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

  7. Thanks,
    It’s really helpful.

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

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

  10. 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 <[email protected]>" . "\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?

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

  12. 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 <[email protected]>" . "\r\n"; // del if not needed
            $headers .= "Bcc: Name <[email protected]>" . "\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

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

  14. 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 <[email protected]>" . "\r\n"; // del if not needed
            $headers .= "Bcc: Me <[email protected]>" . "\r\n"; // del if not needed
        }
        return $headers;
    }
    
    1. Looks good to me Amanda

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

    1. Cool

  16. Hi,
    thanks it is still working!
    thanks

    1. Nice!

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

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

    1. Yes!

  19. 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 <[email protected]>" . "\r\n"; // del if not needed
        }
        return $headers;
    }
    
  20. 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? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. 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 BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published.