impress-org / woocommerce-preview-emails

The easiest way to preview your WooCommerce emails as a reference while you customize them in your theme.
GNU General Public License v2.0
152 stars 32 forks source link

New Account Email #5

Closed Dooza closed 7 years ago

Dooza commented 9 years ago

I have another strange issue, the new account email that the customer receives when they create an account during the checkout, is somehow not being processed correctly, as the email arrives with "//We need jQuery for some of the preview functionality " displaying. When looking at the source I can see JavaScript that shouldn't be there, and style declarations too. When the user signs up via the my-account page, it sends perfectly. Is this related to your scripts or core woocommerce?

mathetos commented 9 years ago

That sounds related. I'll need to dig into it to confirm, but I'm marking it a bug for now. If you find the source and a fix, would love a Pull Request.

Dooza commented 9 years ago

I think I have it sorted now, just need to change email-header.php and email-footer.php.

Change this

if (strpos($url,'admin-ajax.php') !== false){

to this

if (!strpos($url,'admin-ajax.php') === false){

Dooza commented 9 years ago

See http://php.net/strpos for an explanation cos I don't honestly get it myself :)

mathetos commented 9 years ago

Awesome. I'll test that out. Appreciate the feedback and code!

mathetos commented 7 years ago

I've updated this library to support the latest WooCommerce 2.6+ Update and all should be fine. Thanks!