Skip to content

Commit

Permalink
Merge pull request woocommerce#14934 from woocommerce/fix/14151
Browse files Browse the repository at this point in the history
Only set reply-to if the email + name is set.
  • Loading branch information
claudiosanches authored May 8, 2017
2 parents f494142 + a4ad49a commit d2fb33c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/emails/class-wc-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function get_recipient() {
public function get_headers() {
$header = "Content-Type: " . $this->get_content_type() . "\r\n";

if ( 'new_order' === $this->id ) {
if ( 'new_order' === $this->id && $this->object && $this->object->get_billing_email() && ( $this->object->get_billing_first_name() || $this->object->get_billing_last_name() ) ) {
$header .= 'Reply-to: ' . $this->object->get_billing_first_name() . ' ' . $this->object->get_billing_last_name() . ' <' . $this->object->get_billing_email() . ">\r\n";
}

Expand Down

0 comments on commit d2fb33c

Please sign in to comment.