When someone makes an order in woocommerce, he gets also an email when the order is complete. I’d like to add additional recipients for this email. However! I’d only like this extra BCC to be made on these exact mails. Not all the other mails going through.
It’s something like this, but then with the correct filter / name: add_bcc_to_wc.
…
add_filter( 'woocommerce_email_headers', 'add_bcc_to_wc_admin_new_order', 10, 3 );
function add_bcc_to_wc_admin_new_order( $headers = '', $id = '', $wc_email = array() ) {
if ( $id == 'new_order' ) {
$headers .= "Bcc: my_personal@email.comrn"; // replace my_personal@email.com with your email
}
return $headers;
}
With kind regards,
Dennis
Add bcc e-mail to customer order confirmation