• Resolved relhby

    (@relhby)


    in “new order” email template i am trying to eliminate all information about customer’s email. So i’ve found admin-new-order.php file and deleted:

    do_action( ‘woocommerce_email_customer_details’, $order, $sent_to_admin, $plain_text, $email );

    from there. But all emails still have “reply-to” string, which contains customer’s email. How can i change it to some other email, or delete it please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think you’ll have to write some code to hook woocommerce_email_headers and chop out the existing “Reply-to”. Or depending on what you’re trying to do, would it work to just remove the billing email address field and add a custom email field in its place? That way the new order email wouldn’t “see” the address, but it could still be looked up on the order.

    Elina

    (@elina-cristina)

    Hi @relhby

    You can remove the Reply-to header by editing the function [Get email headers] in class-wc-email.php (woocommerce/includes/emails/class-wc-email.php)

    By the line 380 you have this function and the part [get_billing_email()] must have something to do with this.
    Try to edit or remove this function and see if it does it.

    Ideally, you could use some filter or function in your theme to remove that

    I’m suggesting using the woocommerce_email_headers filter instead of changing WooCommerce’s code in class-wc-email.php because those changes will likely be overwritten in future updates.

    Hey @relhby,

    It’s been a while since we heard from you, so I’m marking this thread resolved. Hopefully, you’ve been able to resolve this, but if you haven’t, please let open up a new topic and we’ll be happy to help out.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘edit Email template’ is closed to new replies.