Skip to content

Instantly share code, notes, and snippets.

@woogist
Last active August 29, 2015 14:09
Show Gist options
  • Save woogist/17d3b9a129c487121517 to your computer and use it in GitHub Desktop.
Save woogist/17d3b9a129c487121517 to your computer and use it in GitHub Desktop.
Send the customer invoice to multiple email addresses
<?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