Created
August 9, 2017 01:41
-
-
Save jfarsen/3029fbcce5914a24bb5aae624e096065 to your computer and use it in GitHub Desktop.
Add bcc email on WooCommerce notifications
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 | |
/* | |
* ajouter une autre adresse email sur les commandes et factures | |
* source : http://stackoverflow.com/questions/19810625/additional-recipients-on-woocommerce-invoice/21350340 | |
*/ | |
add_filter( 'woocommerce_email_headers', 'add_bcc_to_wc_admin_new_order', 10, 3 ); | |
function add_bcc_to_wc_admin_new_order( $headers = '', $id = '', $wc_email = array() ) { | |
if ( $id == 'new_order' ) { | |
$headers .= "Bcc: [email protected]\r\n"; // replace [email protected] with your email | |
} | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment