• Resolved skafec

    (@skafec)


    Hey,

    I am using your plugin to change entire site to request a quote.
    Email templates are being controlled with Email Customizer for WooCommerce with Drag and Drop Email Builder.

    I made template designs and they are working together.
    Now I would like to change from and reply-to info that I get with admin email.
    Is it possible to change it so that customer email is displayed in emails so that I can answer to clients directly from email client?

    Thanks in advance,
    Karlo Skafec.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter skafec

    (@skafec)

    EDIT: I tested if I am going to get what I want when I disable plugin and WooCommerce default emails (“New Order” that gets sent to admin) has what I want.

    Basically, in WooCommerce default emails, reply-to is generated from checkout form and administrators can directly answer to clients inside email client they use.

    NP Quote Request changes this behavior and it changes reply-to mail to be the same as the default admin email. This makes it impossible for store administrators to reply to customers directly from email client.

    How can I change this so that when I use “RFQ-ToolKit New RFQ Admin” email, I get client’s email address in reply-to?

    Plugin Author Neah Plugins

    (@gplsaver)

    I will look at the WooCommerce default email and see how we can roll it in the next update.

    Plugin Author Neah Plugins

    (@gplsaver)

    You can try this:

     add_filter('woocommerce_email_headers', 'gpls_add_reply_to_admin_order'), 1000, 3);
    
     function gpls_add_reply_to_admin_order($header = '', $id = '', $order)
            {
                $header = 'Content-Type: text/html' . "\r\n";
    
                if ($id == 'new_rfq') {
                    $reply_to_email = $order->get_billing_email();
    
                    if ($order && $order->get_billing_email() && ($order->get_billing_first_name() || $order->get_billing_last_name())) {
                        $header .= 'Reply-to: ' . $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() . ' <' . $order->get_billing_email() . ">\r\n";
                    }
    
                }
    
                return $header;
            }
    Thread Starter skafec

    (@skafec)

    Hello,

    Thank you for quick reply.
    You have small syntax error,but this code worked!
    Now I have reply-to field generated from billing email and I can
    reply to buyers directly from client without the need to make new
    email every time.

    Thank you for your help,

    Karlo.

    • This reply was modified 5 years, 4 months ago by skafec.

    Hi,

    Can you please advise where to put this code? Thank you.

    Update: I got it the functions.php file and the syntax was the extra bracket, should be like this:

    add_filter(‘woocommerce_email_headers’, ‘gpls_add_reply_to_admin_order’, 1000, 3);

    • This reply was modified 5 years, 4 months ago by lgmtl.
    Plugin Author Neah Plugins

    (@gplsaver)

    You no longer need to add it. It has been added to the plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change from/reply-to field’ is closed to new replies.