• Hello VillaTheme team,

    I’m using your plugin Email Template Customizer for WooCommerce (v1.2.18) together with TrackShip (v1.9.6) and WooCommerce 10.2.1.

    The issue:

    • TrackShip sends “Order has arrived / Ready for pickup” emails.
    • When Email Template Customizer is active, these TrackShip emails arrive to customers with empty body (only subject is visible).
    • If I disable Email Template Customizer, the body is displayed correctly.

    It looks like ETC is overriding TrackShip’s templates and clearing the email body.
    Question: How can I exclude TrackShip emails from being customized by ETC, so ETC continues to work for WooCommerce core emails, but does not touch TrackShip notifications?

    Environment:

    • PHP 8.1.33
    • SendGrid SMTP
    • No custom translations for these emails.

    Thanks in advance for your help!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter askarbiishev

    (@askarbiishev)

    Thread Starter askarbiishev

    (@askarbiishev)

    [FIX] TrackShip emails show empty body when Email Template Customizer (ETC) is active

    Environment

    WooCommerce 10.2.1 • PHP 8.1.33 • Email Template Customizer for Woo v1.2.18 • TrackShip v1.9.6
 (Reproducible with or without SMTP.)

    Symptom
    TrackShip notifications (Arrived / Delivered / Ready for pickup) are sent with an empty email body when ETC is enabled. Disabling ETC makes the emails normal again.

    Root cause
    ETC’s compatibility layer hooks into TrackShip and re-renders the message using ETC’s template, which in some cases wipes the body. The hook is added in:
    /wp-content/plugins/email-template-customizer-for-woo/includes/compatible.php

    Constructor of VIWEC\INC\Compatible:

    add_filter( ‘trackship_mail_content’, [ $this, ‘trackship_mail_content’ ], 99, 2 );

    Quick fix (works immediately, but will be overwritten by plugin updates)

    Edit the file above and comment out the hook registration:

    // add_filter( ‘trackship_mail_content’, [ $this, ‘trackship_mail_content’ ], 99, 2 );

    After commenting out that line, TrackShip emails are delivered with their own content/body again, while WooCommerce core emails continue to use ETC templates.
    Suggestion to vendor
 Please add a setting to exclude TrackShip emails from ETC or guard the compatibility layer so it doesn’t override TrackShip’s rendered content.

    Hello,

    Thank you for your detailed report and for sharing the fix. We really appreciate the effort.

    Actually, that is simply removing one of our plugin’s features. If the email body is showing as empty, it may be due to a conflict on your specific site environment. It could be possible that a theme or plugin conflict is causing this behavior. In this case, we would recommend testing by taking the following steps: https://docs.woocommerce.com/document/woocommerce-self-service-guide/

    If you don’t want to perform these tests on the live site, I would recommend reaching out to your web host to see if they offer a staging site as part of your hosting package. If not, then I’d recommend using the WP Staging plugin to duplicate the site.

    If you prefer to remove that filter, you can do it by adding your own PHP snippet to unhook it instead of editing plugin files directly. That won’t be overridden by updating plugin.

    Kind regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Email body empty when using TrackShip emails’ is closed to new replies.