Created
November 30, 2019 08:29
-
-
Save Musilda/5144d5bd48723e1e81f3b7d4847001a9 to your computer and use it in GitHub Desktop.
This file contains 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_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