WCMp bundle is available at a slashed price

Grab It Now

Different Email Addresses for WCMp Catalog Enquiry

Different Email Addresses for WCMp Catalog Enquiry2019-08-13T11:32:23-05:00

Home Support Forum WCMp Catalog Enquiry Different Email Addresses for WCMp Catalog Enquiry

WCMp Catalog Enquiry

Different Email Addresses for WCMp Catalog Enquiry Open

Tagged: 

  • Author
    Posts
  • KurtB
    Participant
    Post count: 5

    Hi – I’m wondering if it is possible to send the enquiry message to different email addresses based on the product. For example my online catalog has products from 2 different physical locations (East and West) and right now the enquiries are going to both email addresses (info@domain-east.com and info@domain-west.com) as set up in the plug-in.

    The client would like to change this so that only the location that has the actual product will get the email and not both email addresses. Each product already has the correct email associated with it via an “email” attribute in WooCommerce. Is it possible to send the enquiry ONLY to this email programmatically based on that attribute?

    Thanks in advance for your assistance. – KurtB

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4611

    Hi @kurtb, thanks for getting in touch with us.

    Can you please share the plugin link, that you are using to add email field for each product. So, we can help you out further.

  • KurtB
    Participant
    Post count: 5

    It is a standard WooCommerce attribute on the product page and not a separate plugin. The name of the attribute is “Email” and the slug is “email”. I’ve attached a screenshot to show you how it looks on the product page. My hope was to take the value from the email attribute and use that as the To: address on the enquiry form. Thanks.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4611

    @kurtb, so you are adding a attribute called email manually? Or is this attribute is getting added automatically?

    Also, the email id you are passing here, this is also receiving the enquiry email, right!

  • KurtB
    Participant
    Post count: 5

    Correct – the user is entering it manually for each product they add to the site (East or West). I have the same 2 email addresses set up to receive the emails under the “Enquiry Mail Override” settings.

    Since you are already adding the product name in the subject I was thinking it might be possible to do the same with the “To:” address for each product.

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4611

    @kurtb, our enquiry plugin is sending the query email to both email id, because you have set them via WC Catalog Enquiry settings.

    Now, our plugin doesn’t check what email attribute you have set for each product. So, in order to add this support i.e. send email to the id assigned for that product, you have to do custom code.

    If you need any reference of hook/filter, let us know.

  • KurtB
    Participant
    Post count: 5

    If you have an reference materials for doing the custom code please let me know. I can see that the Title of the product is entered into the form as the Subject so if I can pre-select the To address the same way I’d like to give it a try. Thanks

  • NerdySupportExpert Moumita
    Keymaster
    Post count: 4611

    @kurtb, you need to use this filter for this – add_filter( 'woocommerce_email_recipient_wcce_send_email', 'recipient_added_for_enquiry' ,10 , 3 );

Please LOGIN to reply to this topic