Hi @computeque,
I’ll look into this one and get back to you by tomorrow.
Thanks,
Pinal
Thank you, is there any update on if this is possible to implement?
I’ve tried to add it into the template for the request new quote but it always breaks it. I’ve also tried adding something to functions.php to add the reply-to header with the customers email prior to sending, but I can’t seem to get that working either.
-
This reply was modified 2 years, 8 months ago by
computeque.
Hi @computeque,
Sorry I missed replying to you. You can try adding the below code to the functions.php file. The code uses existing WC hooks. I’ve added checks to compare and make sure that the headers are modified only for the quote email notification being sent to the admin.
function modify_addr( $default_addr, $email, $from_email ) {
if ( 'qwc_req_new_quote' === $email->id ) {
$email_obj = $email->object;
$default_addr = $email_obj->billing_email; // Customer Email Address.
}
return $default_addr;
}
add_action( 'woocommerce_email_from_address', 'modify_addr', 10, 3 );
The above code modified the reply to email address.
function modify_name( $default_name, $email, $from_name ) {
if ( 'qwc_req_new_quote' === $email->id ) {
$default_name = 'Customer';
}
return $default_name;
}
add_action( 'woocommerce_email_from_name', 'modify_name', 10, 3 );
This will modify the Name in the Reply-to: header.
I hope this helps.
Thanks,
Pinal