Filter - woocommerce_email_recipient_new_order
add_filter( 'woocommerce_email_recipient_new_order', 'blz_add_recipient', 10, 3 );
/**
* Add Branch to order notification email recipients
*
* @param string $recipient
* @param WC_Order|bool $order
* @param WC_Email $wc_email e.g. WC_Email_New_Order
* @return string
*/
public function blz_add_recipient( $recipient, $order, $wc_email ){
if ( ! $order instanceof WC_Order ) {
return $recipient;
}
// Code to add or edit recipient
return $recipient;
}
Filter - woocommerce_email_recipient_cancelled_order
add_filter( 'woocommerce_email_recipient_cancelled_order', 'blz_add_recipient', 10, 3 );
// Similar function structure to above
Filter - woocommerce_email_recipient_failed_order
add_filter( 'woocommerce_email_recipient_failed_order', 'blz_add_recipient', 10, 3 );
// Similar function structure to above
Filter - woocommerce_email_recipient_customer_refunded_order
add_filter( 'woocommerce_email_recipient_customer_refunded_order', 'blz_add_recipient', 10, 3 );
// Similar function structure to above
Filter - woocommerce_email_recipient_customer_partially_refunded_order
add_filter( 'woocommerce_email_recipient_customer_partially_refunded_order', 'blz_add_recipient', 10, 3 );
// Similar function structure to above
Action - woocommerce_email_order_meta