Created
October 4, 2019 02:55
-
-
Save AmeliaBriscoe/a866924c607784aff095dcf7ab90024b to your computer and use it in GitHub Desktop.
Add Bcc to WooCommerce Emails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 2); | |
function mycustom_headers_filter_function( $headers, $object ) { | |
$email = array('new_order', 'new_booking'); | |
if (in_array($object, $email)) { | |
$headers .= 'BCC: Admin <[email protected]>' . "\r\n"; | |
} | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment