Created
August 21, 2018 05:34
-
-
Save alewolf/6b1a63e1185f1e97a50789d793f864ab to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
// replace reply-to email address for WooCommerce customer emails | |
add_filter( 'woocommerce_email_headers', 'new_customer_order_reply_to_email_address', 20, 3 ); | |
function new_customer_order_reply_to_email_address( $header, $email_id ) { | |
$customer_email_ids = array( | |
'customer_on_hold_order', | |
'customer_processing_order', | |
'customer_completed_order', | |
'customer_invoice', | |
'customer_new_account', | |
'customer_note', | |
'customer_refunded_order', | |
'customer_reset_password', | |
); | |
if ( in_array( $email_id, $customer_email_ids ) ) { | |
$header .= 'Reply-to: <[email protected]>\r\n'; | |
} | |
return $header; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment