Skip to content

Instantly share code, notes, and snippets.

@Musilda
Created November 30, 2019 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Musilda/5144d5bd48723e1e81f3b7d4847001a9 to your computer and use it in GitHub Desktop.
Save Musilda/5144d5bd48723e1e81f3b7d4847001a9 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'woocommerce_email_recipient_customer_completed_order', 'your_email_recipient_filter_function', 10, 2);
function your_email_recipient_filter_function($recipient, $object) {
$recipient = $recipient . ', me@myemail.com';
return $recipient;
}
add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 2);
function mycustom_headers_filter_function( $headers, $object ) {
if ($object == 'customer_completed_order') {
$headers .= 'BCC: My name <my@email.com>' . "\r\n";
}
return $headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment