I am trying to add a BCC recipient to a specific type of mail sent by WooCommerce. This concerns the customers that receive a renewal mail. The type of the mail is 'Completed Renewal Order'.
I am aware of this post: How to add BCC recipient to all emails sent by WooCommerce? which discusses adding a BCC to every mail sent by WooCommerce.
The solution for that problem was found as:
function add_bcc_all_emails( $headers, $object ) {
$headers = array(
$headers,
'Bcc: Me <my@mail.net>' ."\r\n",
);
return $headers;
}
add_filter( 'woocommerce_email_headers', 'add_bcc_all_emails', 10, 2 );
I would like to edit this code, so we can add a BCC to the 'Completed Renewal Orders' only.