Change Woocommerce New Order reply-to address to customer

A client wanted to be able to easily contact customers through the New Order admin notification in Woocommerce by simply replying to that notification. The default reply-to is the store owner’s email, so we needed a way to make it appear as if it came from the customer.

new-order-email-receipent

After trying and failing a handful of solutions, including routing email through Mandrill, I came across a plugin by Peter Hartree:

WooCommerce New Order Email Notification from Customer.

Yes it works. Yes it was the easiest $12 fix ever.

Dec 29, 2018 Update: Over the years this plugin has stopped working and the developer has stopped maintaining or even selling it.

Here’s a script that I recently updated to work for my client. Add it to your functions.php file or custom functions plugin:

https://gist.github.com/spigotdesign/a2735d18b8da7d101fe2fefa8b2df28d

Let me know in the comments if this script works for you!

22 Comments

  1. Joe on May 20, 2015 at 2:22 pm

    I need this plugin…how can I get it?

    • Bryan Hoffman on May 20, 2015 at 2:26 pm

      Hmm, looks like his site is no longer showing this plugin. Try getting him at Twitter?

  2. Ken Whitinger on May 26, 2015 at 10:58 am

    I need this too. I can\’t believe Woo doesn\’t have this function built it.

  3. Vincent on June 9, 2015 at 2:46 pm

    Hi Bryan, I don\’t see any twitter reply from him. I need this plugin now. Do you think you can send a copy to me and I will ping him to get his paypal account and pay him later? Let me know. Thanks.

  4. Andrew on August 17, 2015 at 8:03 am

    In case any of you are still looking for a solution to this, I managed to create my own plugin using the code below. Just create a new folder in the Plugins directory and add one php file with the same name as the folder you created. Then insert this code:

    [php]
    <?php
    /*
    Plugin Name: GroupBooked Reply to Customer
    */

    //This plugin adds a "reply-to" on New Order Emails so that the customer can be replied to directly

    add_filter( \’woocommerce_email_headers\’, \’mycustom_headers_filter_function\’, 10, 3);

    function mycustom_headers_filter_function( $headers, $object, $order ) {
    if ($object == \’new_order\’) {
    $headers .= \’Reply-to: \’.$order->billing_first_name.\’ \’.$order->billing_last_name.\’ <\’.$order->billing_email.\’>\’ . "rn";
    }

    return $headers;
    }

    ?>
    [/php]

    • Bryan Hoffman on August 17, 2015 at 9:23 am

      Thanks for sharing your plugin Andrew, I\’ll look forward to testing it.

    • oleg on April 26, 2018 at 12:43 am

      Im also need this, any help? Now its not working..

      The snippet has been deactivated due to an error on line 3:
      syntax error, unexpected ”new_order\’) { ‘ (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING)

  5. Peter Hartree on November 17, 2015 at 9:16 am

    Hi all,
    I\’m sorry for the slow reply. If you\’re still looking for the plugin, you can find it here:

    https://sellfy.com/p/98Kw/

  6. Robert Hartman on May 6, 2016 at 2:55 pm

    I have to say, its a great idea – but from having the plugin not be available at the original location to now having it placed o the Sellfy platform, through which the PayPal process for me did NOT work, is a bit of a fail. Why not publish through the Envato marketplace?

  7. Valerie on October 6, 2017 at 2:01 pm

    Hi Bryan,

    I have many customers who reply to their Order emails with support questions. Because I use my own email within WordPress in the General Settings, they reply directly to me (because that is the “From” address on the order emails).

    I need the order emails to have a different “from” address so that when they reply they hit our support team instead of my general email.

    Besides changing the email in my general settings, WooCommerce has told me this isn’t really possible with the current setup. Do you know of any workaround?

    Thanks,

    Valerie

    • Bryan Hoffman on October 6, 2017 at 2:59 pm

      Hi Valerie,

      You can set a from email address in WooCommerce > Settings > Emails. Below the list of emails you’ll find ‘Email sender options,’ and can be set separately from your General WordPress admin email.

      Unless that’s the general email you’re already referring to…

      LMK.

      • Valerie on October 6, 2017 at 3:09 pm

        In WooCommerce>Settings>Emails I have the From email as our support team as suggested.

        In WordPress>General Settings> I have the email address as my personal email.

        I’m told that whatever email I have in WordPress > General Settings is the one that WooCommerce will use as the “from” address on Customer Order emails.

        So a customer will get their new order email, have a question about it and hit reply….which goes to my WordPress General Settings email (personal). It’s strange, I contacted WooCommerce about it today and they sent me to you 🙂

      • Bryan Hoffman on October 6, 2017 at 6:10 pm

        They sent you to me? Wow, well that’s nice of them 🙂 I didn’t realize they knew I existed!

        That is very strange… WooCommerce’s own documentation says the following:

        Set the ‘From’ name and email address for the sender used in WooCommerce emails.

        I’m pretty sure ours are sent as the email entered there…

        • Valerie on October 6, 2017 at 6:14 pm

          They sent me to this thread here 🙂

          Okay, that’s what I was thinking too, but it keeps going to my personal email. so strange!

      • Tevya on April 7, 2018 at 1:08 pm

        I have a similar need to Valerie. Though I’d specifically like customer’s to get emails “from” one address, but set the “reply-to” to be another email. The from option in WooCommerce works just fine for me, I just want to set a reply-to separately to allow it work properly with my Help Desk. Has anyone found a solution to this?

  8. oleg on April 26, 2018 at 12:41 am

    Hi! Any working solution? As now its not working .. anybody can help me? Thnks
    [email protected]

  9. Mimi Sidwell on December 19, 2018 at 4:59 pm

    I have the same problem. I used the wonderful little plug-in “WooCommerce Reply-to-Customer but it quit working a few days ago. The author seems to not be offering or supporting it any more. I have tried to contact him, will see. Why WooCommerce does not offer this essential and simple option is beyond me. You get an order, you reply to the order, simple. But oh no, not with WooCommerce. So frustrating. If someone finds a solution I’d like to hear about it.

    • Bryan Hoffman on December 29, 2018 at 10:20 am

      Hi Mimi,

      I’ve updated this post with a new script that works for my client. Give it a try!

  10. Marina Vergin on October 6, 2019 at 5:11 am

    Thank you for your post.
    I wonder why Woocommerce don’t repair their plugin. It is a grait plugin and this option is very useful to many users. I am sure many users are willing to pay for it.
    I don’t know php and I won’t take any risk to crash the plugin with code.
    Thank you anyway.
    Marina

  11. Nehal Shah on November 9, 2019 at 3:21 am

    This solution is not working as there is your one mistake. You have written ‘woocommerce_email_header’ filter in your code but it is actually an action hook. Correct filter is ‘woocommerce_email_headers’.

Leave a Comment