• Hello,

    I’m experiencing a weird issue recently. The email sent after an order is broken.

    When I look at the email’s code I see there’s a problem with the header (email-header.php)

    <h1><?php echo esc_html( $email_heading ); ?></h1>

    in the template turns to:

    <h1 style='font-family: "Helvetica Neue",Helvetica,Roboto,A

    when generated. The tag didn’t close and I’ve no idea why. So HTML after that is broken too.

    I’ve nothing in functions.php which would change the email templates.

    I don’t know where to look further. Hope someone could help ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Reynier C. (woo-hc)

    (@reynierc)

    Hi @troon3000 ,

    Thank you for reaching out. From what you provided, it seems like the email template might be corrupted or not updated properly. Here’s a quick step you can follow.

    1. Go to WooCommerce > Settings > Emails and scroll down to the order related email that’s causing the problem.
    2. Click on “Manage” next to the email.
    3. At the bottom of the email settings, you’ll see a link to “Copy file to theme”. Click that, which will copy the email template to your theme’s folder.
    4. After copying, you can edit the email-header.php file in your theme’s WooCommerce folder (usually found in wp-content/themes/your-theme/woocommerce/emails).

    Remember to only edit if you’re comfortable with code. Or, reach out to your theme’s support team for help. Also remember to secure a backup of your site just to be safe. Let me know how it goes.

    Thread Starter troon3000

    (@troon3000)

    hello,

    thanks Reynier C. for your answer, but that’s not helping so far ??

    I know how to edit templates, I’m comfortable with code, that’s my job.

    I really don’t know why this H1 tag doesn’t close. I have even reinstalled Woocommerce, I still have this problem, and I keep don’t know where to look at. Template files looks good, I found nowhere any broken tag. Of course, I tried to use the native template and I got the same problem.

    Any idea, anything else to check? I’m lost. I was really starting to wonder if this wasn’t a bug in a recent version of Woocommerce, since I’d never had the problem before?

    Plugin Support Reynier C. (woo-hc)

    (@reynierc)

    Hi @troon3000 ,

    Thanks for getting back to me. I understand how the email header not working could be frustrating. May I ask if you remember when the broken tag first showed up? Also, have you updated your themes or plugins recently? If not, please try updating them. If that doesn’t fix it, you can grab a new email-header.php file from the original WooCommerce files and replace the old one.

    You can get a fresh copy of the email-header.php file from a new download of WooCommerce. Just go to WooCommerce.com, click on ‘My Account’ and then ‘Downloads’. From there, download the latest version of WooCommerce. Once you have it, unzip the file and navigate to the woocommerce/templates/emails/folder to find the DEFAULT email-header.php file. Upload this to your server in the same location, taking care to back up your old file first. If you’ve made any customizations, you’ll need to apply those to the new file.

    I have even reinstalled Woocommerce, I still have this problem, and I keep don’t know where to look at.

    Note: Reinstalling WooCommerce should give you a fresh set of the plugin’s files, including email-header.php. However, if you’ve customized the templates in your theme, these customizations won’t be overwritten by reinstalling. If it was CUSTOMIZED, make sure to check your theme’s folder, usually located at wp-content/themes/your-theme/woocommerce/emails/, for an overridden version of the file. If you find it there, you can compare it with the default copy to make any necessary corrections.

    If it still doesn’t work after this, kindly send us the system status report so we can check if something else might be causing the issue. You can find this via?WooCommerce?→?Status. Select?Get system report?and then?Copy for Support. It should give us a broader view of your site’s build and help us narrow down the issue.

    Looking forward to getting this sorted out.

    Thread Starter troon3000

    (@troon3000)

    Hello,

    thanks for your answer, but yes I have already did all you proposed ?? I just update Woocommerce, deleted my template emails, nothing has changed ??

    here’s the system status report (expired in one week), thanks: https://pastebin.com/r4aRm8vK

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for sharing the SSR. Everything appears fine in the SSR from what I can see.

    To assist you further, could you please create a staging environment for your site for testing purposes? On the staging site, activate a default WordPress theme like Storefront or Twenty Twenty-Four, along with only the WooCommerce plugin. Then, try placing a test order to check if the email issue persists.

    This process will help determine if another plugin on your site is causing the issue. Currently, we’re unable to replicate the problem on our test site.

    For detailed instructions on how to perform a conflict test, you can refer to this guide: How to Test for Conflicts.

    Let me know how it goes!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.