In Woocommerce, I would like to change the email address that should always be used as the reply address for all emails notifications.
How is this possible with Woocommerce?
Updates:
WC_Email
instance object is now included as the 4th argument in the function.The following will change the "Reply to" email address (and name) in all email notifications:
add_filter( 'woocommerce_email_headers', 'change_reply_to_email_address', 10, 4 );
function change_reply_to_email_address( $header, $email_id, $order, $email ) {
// HERE below set the name and the email address
$reply_to_name = 'Jack Smith';
$reply_to_email = 'jack.smith@doamin.tld';
$header = 'Content-Type: ' . $email->get_content_type() . "\r\n";
$header .= 'Reply-to: ' . utf8_decode($reply_to_name) . ' <' . sanitize_email($reply_to_email) . ">\r\n";
return $header;
}
This code goes on function.php file of your active child theme (or theme). Tested and works (Thanks to helgatheviking).
Related: Custom "reply to" email header in Woocommerce New Order email notification