Hello,
I have a problem with this part, I would like to set the Client name instead of just the E-mail when clicking Reply. Here is the code I used to work "Reply To":
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' ) {
$headers .= "Reply-To: ".$order->billing_email."\r\n";
}
return $headers;
}
As you can see this code works as follows, when responding to the new Order E-mail from WooCommerce it will respond to the Customer's Email filled in on the Store Billing Form. I would like to also put the Client's name.
One example I'm trying to explain is PHPMailer that works like this:
$mailer->AddReplyTo($_POST["email"], $_POST["nome"]);
In this PHPMailer template when clicking on reply it does more or less this:
Rodrigo Macedo <[email protected]>,
Does anyone have an idea how I can do this?
I've tried adding the code in the name in front of PHPMailer's email in many ways, but without success ...