Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Reply-to customer in email of vendor email notification.
- This topic has 4 replies, 2 voices, and was last updated 4 years, 8 months ago by alexdezi.
- AuthorPosts
- April 23, 2020 at 3:03 am #122004alexdeziParticipant
Hello!
If a vendor receives an email about a new purchase and he clicks on reply in the email (wanting to reply to the customer), I get the email. Is there a way to insert the customer email in the reply-to?
This works fine in the standard woocommerce emails, but not in the vendor notification emails.
Thank you!
- April 23, 2020 at 1:26 pm #122112Sarmistha ChakrabortyMember
Hello,
Try this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/add_filter( 'woocommerce_email_headers', function( $header, $mail_id, $mail_object, $clsobject ) { global $WCFM, $WCFMmp; if ( in_array( $mail_id, array( 'new_order', 'cancelled_order', 'failed_order','store-new-order' ), true ) ) { $header = 'Content-Type: ' . $clsobject->get_content_type() . "\r\n"; $header .= 'Reply-to: ' . $mail_object->get_billing_first_name() . ' ' . $mail_object->get_billing_last_name() . ' cuscheck1<' . $mail_object->get_billing_email() . ">\r\n"; } return $header; }, 50, 4 );
Thanks.
- April 23, 2020 at 5:51 pm #122203alexdeziParticipant
This works, thank you!
Do you think it’s safe to delete or rename cuscheck1? As it appears in the mail in the name.
Attachments:
You must be logged in to view attached files.- April 23, 2020 at 8:03 pm #122237Sarmistha ChakrabortyMember
Hello,
Oh! Am extremely sorry. please delete “cuscheck1” from Reply-to. I was use it for testing purpose. Modify the code,
add_filter( 'woocommerce_email_headers', function( $header, $mail_id, $mail_object, $clsobject ) { global $WCFM, $WCFMmp; if ( in_array( $mail_id, array( 'new_order', 'cancelled_order', 'failed_order','store-new-order' ), true ) ) { $header = 'Content-Type: ' . $clsobject->get_content_type() . "\r\n"; $header .= 'Reply-to: ' . $mail_object->get_billing_first_name() . ' ' . $mail_object->get_billing_last_name() . '<' . $mail_object->get_billing_email() . ">\r\n"; } return $header; }, 50, 4 );
Thanks.
- April 24, 2020 at 2:04 am #122313alexdeziParticipant
This is awesome, thanks!
- AuthorPosts
- You must be logged in to reply to this topic.