All order email sending to CUSTOMER from default woocommerce email address, for example, webshop@shop.com
and this is OK, but I want add a reply email address for these emails, so user able to reply this custom address, such as reply@webshop.com
.
Also I want set this reply email address based on $order
shipping method. If shipping method is 'local_pickup_plus
' set reply address to reply1@webshop.com
, else set reply2@webshop.com
.
I figure out, I can modify headers with woocommerce_email_headers
filter, but only for email sent to the admin.
add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 3);
function mycustom_headers_filter_function( $headers, $object, $order ) {
if ($object == 'new_order') {
$headers .= 'Reply-to: teszt@teszt.hu';
}
return $headers;
}
How can I set this for customer emails?