Last active
June 15, 2016 15:56
-
-
Save stevenhoney/2ae9264b8e8fa265bfdacab8913cc2d0 to your computer and use it in GitHub Desktop.
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', 'sh_add_bcc_order_email', 10, 3); | |
function sh_add_bcc_order_email( $headers, $email_id, $order ) { | |
// list of possible values for $email_id can be found here http://www.mootpoint.org/blog/customising-woocommerce-notification-emails-hooks-filters/ | |
if ($email_id == 'customer_completed_order') { | |
$bcc_email = "[email protected]"; // change to the required email address here | |
$headers .= 'BCC: ' . $bcc_email . "\r\n"; | |
} | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment