Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong name in emails #15

Open
geselle-jan opened this issue Nov 2, 2016 · 3 comments
Open

wrong name in emails #15

geselle-jan opened this issue Nov 2, 2016 · 3 comments

Comments

@geselle-jan
Copy link

When I send custom emails by bulk-changing the status of multiple orders, the customer_billing_name is filled with the name of the customer from the first order in every email. Though the emails are sent to the correct addresses.

@mehulkaklotar
Copy link
Member

@geselle-jan That won't be possible because every email has its own Order object and if order has its own customer billing name.

@aliozinan
Copy link

Same issue here. Still looking for a resolution.

Say you've selected 5 orders and updated their status : the 5th order's email is sent to all orders' customers. Thus, the 1st to 4th orders' customers are receiving this email as well, with the 5th order's {customer_billing_name}

Will try to provide an update when I find that loop.

@aliozinan
Copy link

aliozinan commented Apr 2, 2018

Found a solution :

change line 81 at woo-custom-emails/admin/class-wcemails-instance.php :

$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );

to :

$this->send( $this->recipient, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );

Enable Send Only to Customer? option and add your store's email address into Recipients field if you want to follow these notifications as well.

Reason :
$this->get_recipient() is a function of WC_Email class while the plugin has its own function to get the recipients for the WC_Email::send() function inside the trigger function, so it must be in use instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants