Reply-to customer in email of vendor email notification.

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 3 reply threads
  • Author
    Posts
    • #122004
      alexdezi
      Participant

      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!

    • #122112

      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.

    • #122203
      alexdezi
      Participant

      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.
      • #122237

        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.

    • #122313
      alexdezi
      Participant

      This is awesome, thanks!

Viewing 3 reply threads
  • You must be logged in to reply to this topic.