• Resolved fistukidz

    (@fistukidz)


    Hello,
    when we have a new order, then we get a new order email. the from address is our admin address and the reply-to address is the customer email. how can we remove the reply to address or change it to be the same as the from address?
    gmail remove our new order emails to junk because the from and reply to address are not the same.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    You will need to write some custom code. Here is an example: https://stackoverflow.com/questions/39805435/change-reply-to-header-of-admin-new-order-email-woocommerce that uses the correct filter and gets the customer billing address.

    So for you it will probably be something like:

    add_filter( 'woocommerce_email_headers', 'add_reply_to_wc_admin_new_order', 10, 3 );
    
    function add_reply_to_wc_admin_new_order( $headers = '', $id = '', $order ) {
        if ( $id == 'new_order' ) {
            $reply_to_email = "[email protected]";
            $headers .= "Reply-to: <$reply_to_email>\r\n";
        }
        return $headers;
    }
    Thread Starter fistukidz

    (@fistukidz)

    hello,
    thank you for the quick answer. The code above will change the reply to address only for a new order email or to all my woocommerce emails?

    Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    The if ( $id == 'new_order' ) checks whether this is a new order email and only then executes the code. Only your new order emails should be affected. But no warranties. Always test this and you might have to add corrections.

    Kind regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New order Reply to’ is closed to new replies.