// WOOCOMMERCE EMAILS
//Customer Emails array
$shop_emails = array('customer_processing_order', 'customer_completed_order', 'customer_refunded_order', 'customer_partially_refunded_order', 'customer_invoice', 'customer_note' );
// Change Reply-To Name
add_filter( 'woocommerce_email_headers', 'change_reply_to_email', 10, 3 );
function change_reply_to_email( $header, $email_id, $order ) {
$name = 'Black & Black Surgical';
$email = 'info@blackandblacksurgical.com';
if( in_array($email_id, $shop_emails){
$header .= 'Reply-to: ' . $name . ' <' . $email . ">\r\n";
}
return $header;
}
// Change From Email
add_filter( 'woocommerce_email_from_address', 'change_from_email', 10, 3 );
function change_from_email( $from, $email ) {
if( in_array($email_id, $shop_emails){
$from = 'info@blackandblacksurgical.com';
}
return $from;
}