Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stevenhoney/2ae9264b8e8fa265bfdacab8913cc2d0 to your computer and use it in GitHub Desktop.
Save stevenhoney/2ae9264b8e8fa265bfdacab8913cc2d0 to your computer and use it in GitHub Desktop.
<?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