Last active
August 29, 2015 14:09
-
-
Save woogist/17d3b9a129c487121517 to your computer and use it in GitHub Desktop.
Send the customer invoice to multiple email addresses
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_invoice', 'wc_send_invoice_multiple_addresses' ); | |
function wc_send_invoice_multiple_addresses( $recipient ) { | |
$recipient = rtrim( trim( $recipient ), ',' ); | |
$new_recipients = array( | |
'yourmeail@domain.com', | |
'onemore@anotherdomain.com', | |
//Add more email addresses if needed | |
); | |
$recipient .= ',' . implode( ',', $new_recipients ); | |
return $recipient; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment