Created
October 14, 2014 18:02
-
-
Save justinstern/1003d98afd109565b610 to your computer and use it in GitHub Desktop.
WooCommerce order email to multiple recipients http://www.sellwithwp.com/customizing-woocommerce-order-emails/#comment-259335
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 | |
// This sample code will add additional recipients to a WooCommerce email order type, based on the order email address | |
// Email id's for the various email types (i.e. customer_invoice) can be found here: | |
// https://github.com/woothemes/woocommerce/blob/5e09f15c91970d8bec4ab56abbfd5d3039a02a1b/includes/emails/class-wc-email-customer-invoice.php#L30https://github.com/woothemes/woocommerce/blob/5e09f15c91970d8bec4ab56abbfd5d3039a02a1b/includes/emails/class-wc-email-customer-invoice.php#L30 | |
// Add the following to the bottom of your theme's functions.php: | |
add_filter( 'woocommerce_email_recipient_customer_invoice', 'woocommerce_email_customer_invoice_add_recipients' ); | |
function woocommerce_email_customer_invoice_add_recipients( $recipient, $order ) { | |
if ( 'joe@acme.com' == $recipient ) { | |
$recipient .= ', billing@acme.com'; | |
} | |
return $recipient; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment