/**
* Change Woocommerce New Order reply-to address to customer
*/
add_filter('woocommerce_email_headers', 'change_new_order_email_reply_to', 10, 3);
function change_new_order_email_reply_to($headers, $email_id, $order) {
if ($email_id === 'new_order') {
$customer_name = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name();
$customer_email = $order->get_billing_email();
$headers .= "Reply-To: $customer_name <$customer_email>\r\n";
}
return $headers;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter