• Resolved Fabio

    (@origamifc)


    Hello, I need to set a custom email field in the checkout form and send the order notification to that address too.

    Is it possible to do so using Checkout Field Editor and/or a custom code that captures the content of the custom email field and attaches it to the recipient list of the woocommerce order notification?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    Unfortunately, this feature is not available in our plugin. However, you can achieve this requirement by adding the below hook in your theme’s functions.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;
    }

    We hope this will help ??

    Thank you!

    Thread Starter Fabio

    (@origamifc)

    Hi, I’ve tested the code and it works exactly as intended.
    Thank you very much for going out of your way and support me on this issue even if it’s not directly related to your plugin.

    Plugin Author ThemeHigh

    (@themehigh)

    Great ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Send order notification to additional email field’ is closed to new replies.