Fixes: Add reply-to to admin emails ref #11630

This commit is contained in:
nishit.langaliya 2016-08-22 11:42:21 +05:30
parent dd445d8f09
commit 94ed2fd96d
1 changed files with 3 additions and 4 deletions

View File

@ -289,10 +289,9 @@ class WC_Email extends WC_Settings_API {
* @return string
*/
public function get_headers() {
if ( $this->id == 'new_order' ) {
$header = "Content-Type: " . $this->get_content_type() . "\r\n Reply-to:" .$this->object->billing_first_name.' '.$this->object->billing_last_name.' <'.$this->object->billing_email.'>' . "\r\n";
} else {
$header = "Content-Type: " . $this->get_content_type() . "\r\n";
$header = "Content-Type: " . $this->get_content_type() . "\r\n";
if ( 'new_order' === $this->id ) {
$header .= "Reply-to: {$this->object->billing_first_name} {$this->object->billing_last_name} <{$this->object->billing_email}>\r\n";
}
return apply_filters( 'woocommerce_email_headers', $header, $this->id, $this->object );
}