• Resolved univ182

    (@univ182)


    Hello,

    I need to help.

    it is possible to configure a select type field that depending of their result the email notification change of destinatary. For the new orders and others notifications.

    Example:
    Select the type of field: neighborhood
    Values: “place 1” => [email protected]
    “place 2” => [email protected]

    Thank you very much for your answers.

Viewing 1 replies (of 1 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    We believe that you would like to send a confirmation mail to an additional email when an option is selected from the select field.

    Unfortunately, there is no direct option available in our plugin. However, you can achieve your requirement by adding the below filter in your child theme’s function.php.

    add_filter('woocommerce_email_recipient_new_order', 'additional_email_checkout', 10, 2);
    function additional_email_checkout($emails, $object){
    $aditional_email = get_post_meta($object->id, 'field_name', true);
    if($aditional_email){
    $emails .= ','.$aditional_email;
    }
    return $emails;
    }

    Replace field_name with your select field name.

    Please note that the Option Value should be the email addresses of the corresponding recipients, only then the additional mail will get sent based on the option selected in the select field.

    Please refer to the below screenshot.

    https://prnt.sc/133yenp

    We hope this will help.

    Thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘Select field with option of email’ is closed to new replies.