Skip to content

Instantly share code, notes, and snippets.

@tankbar
Last active July 4, 2017 11:26
Show Gist options
  • Save tankbar/cc0c39c21f0b9f78e6d7fdc2b788db8a to your computer and use it in GitHub Desktop.
Save tankbar/cc0c39c21f0b9f78e6d7fdc2b788db8a to your computer and use it in GitHub Desktop.
WooCommerce - Send a BCC e-mail order copy when order status changes to completed
/* BCC Email for orders completed for WooCommerce version 2.3 and above */
add_filter( 'woocommerce_email_headers', 'es_headers_filter_function', 10, 3);
function es_headers_filter_function( $headers, $id, $object ) {
if ($id == 'customer_completed_order') {
$headers .= 'BCC: Trustpilot <[email protected]>' . "\r\n";
}
return $headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment