Failed Orders won’t use Email Builder template

This topic has 11 replies, 2 voices, and was last updated 5 days, 20 hours ago ago by Jack Richardson

  • Avatar: Farhad
    Farhad
    Participant
    August 12, 2026 at 20:17

    Our email templates look messy, the logo isn’t displayed correctly, and product images are missing, while some email types, like Failed Order, aren’t using the 8theme Email Builder template.

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    10 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 13, 2026 at 06:44

    Hello @Farhad,

    Upon reviewing the issue, we have noted that your email is based on your own hosting domain. This may indicate a configuration issue with your mail system. Therefore, we kindly request that you temporarily set the admin email to one of the most popular services, such as Gmail or a similar provider, and then conduct a test. If the issue is resolved, we recommend contacting your hosting provider to examine the mail configuration, as it may be blocking some images, altering email content, or causing other issues.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Content is visible for topic creator and
    support staff only.
    Avatar: Farhad
    Farhad
    Participant
    August 13, 2026 at 18:37

    Thanks for your reply. Our email provider is already Gmail, and you didn’t answer my question about this issue: “email types, like Failed Order, aren’t using the 8theme Email Builder template.” Given that it takes you 24 hours to respond, I appreciate someone with sufficient knowledge checking the backend and resolving this issue to avoid days of going back and forth here, which is a waste of time for everyone.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 14, 2026 at 06:11

    Hello @Farhad,

    We hope this message finds you well. As this email is being sent to you in your capacity as an administrator, we kindly request your assistance with the following matter.

    Could you please verify whether all other emails are being correctly displayed and sent to your email address? Additionally, we would appreciate it if you could attempt to set the current “Failed Order” email template to “Default” or completely remove the template to check if the default email content is displayed correctly in your email service under these conditions.

    Please note that all emails are generated and sent based on WooCommerce triggers. If other emails are being sent correctly and only this one is experiencing issues, it might be due to an additional plugin affecting the email sending process. We recommend checking your hosting email logs or reviewing any customizations in your child-theme files.

    Thank you for your attention to this matter.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: Farhad
    Farhad
    Participant
    August 14, 2026 at 18:33

    Thanks, Jack.

    I have already spent enough time performing troubleshooting steps that your team can inspect directly in the backend.

    The issue is not whether the email is being delivered. The Failed Order email is delivered successfully. The issue is that XStore Email Builder is not applying the configured Failed Order template. The email is instead being generated with what appears to be XStore’s fallback/default template, while the specific Failed Order template is correctly configured in the Email Builder.

    This is specifically an XStore Email Builder/template-selection issue, not a request for general WooCommerce or hosting advice.

    At this point, I need someone from your technical team to log in and investigate the actual Email Builder mapping/hooks and resolve the problem. I have already provided the necessary temporary wp-admin/FTP access privately in my first message.

    Given the approximately 24-hour turnaround between replies, continuing with one troubleshooting suggestion per day is not an effective support process and unnecessarily turns a technical issue into several days of back-and-forth.

    Please have a developer or support engineer inspect the site directly and either:

    1. correct the configuration/problem;
    2. apply the appropriate XStore patch;
    3. or identify the exact conflicting component and technical reason it prevents the Failed Order template from being used.

    I’m looking for resolution and action at this stage, rather than additional generic troubleshooting instructions.

    Avatar: Farhad
    Farhad
    Participant
    August 14, 2026 at 18:34

    We have now completed a technical investigation of the issue, and the root cause has been identified. This is an **XStore Email Builder bug**, not a hosting, Gmail, SMTP, WooCommerce trigger, or template-configuration issue.

    The relevant findings are:

    * WooCommerce administrator Failed Order email:

    * Class: WC_Email_Failed_Order
    * ID: failed_order
    * Enabled
    * Recipient: sales@choovio.com

    * WooCommerce also sends the paired customer notification:

    * Class: WC_Email_Customer_Failed_Order
    * ID: customer_failed_order

    * XStore Failed Order template:

    * Post ID: **20204**
    * Published
    * Stored email type: failed_order
    * No duplicate published failed_order template exists

    * XStore Default template:

    * Post ID: **14545**
    * Published

    For actual failed order **#40003**, the transactional log shows the notifications were generated consecutively in this order:

    1. customer_failed_order
    2. failed_order

    There is no published XStore customer_failed_order template.

    The problem is in XStore Core:

    packages/woocommerce-email-template-customizer/includes/email-trigger.php

    The singleton:

    VIWEC\INC\Email_Trigger

    retains Default-template fallback state between the two consecutive WooCommerce emails.

    trigger_recipient() resets $template_id, but does not clear the previous $use_default_temp state.

    As a result:

    1. customer_failed_order has no mapped XStore template and enables the Default fallback.
    2. The immediately following failed_order correctly finds template **20204**.
    3. The correct XStore Failed Order subject is therefore used.
    4. However, the stale Default fallback flag remains set.
    5. During rendering, the body is replaced with Default template **14545**.

    This exactly matches the real received email: the XStore header/footer and correct Failed Order subject are present, but the specific Failed Order template body is missing and the Default fallback body is used instead.

    We also verified:

    * XStore preview of template 20204 renders correctly.
    * XStore’s own test of a failed order sends the complete rich template correctly.
    * No child-theme override or other email-customizer plugin is causing the template selection issue.
    * SMTP/mail transport is not involved.
    * Developer Mode is off.
    * No relevant XStore Patcher fix is currently available.
    * XStore 9.7.7 / Core 5.7.7 is available, but its changelog does not identify a fix for this issue.

    No production settings or vendor files have been modified.

    Please have your development team provide an **official patch** that resets the Default fallback state at the beginning of each email processing cycle — specifically the stale $use_default_temp state in Email_Trigger::trigger_recipient().

    At this stage, I do not need additional generic troubleshooting suggestions. The bug has been isolated to the XStore Email Builder implementation and reproduced with technical evidence.

    Please either:

    1. provide the official patch;
    2. confirm that this is fixed in a specific XStore/Core release and identify that fix;
    3. or have your developer log in and apply the appropriate correction directly.

    Given the 24-hour response cycle, I would appreciate this being escalated directly to the XStore developer responsible for the WooCommerce Email Builder rather than continuing with another round of configuration checks.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 15, 2026 at 15:26

    Hello @Farhad,

    Unfortunately, we were unable to replicate the issue on our end, as the Failed order was sent correctly each time. It might be an issue on your side, but we have attempted to implement a solution that may be useful and resolve the problem. The updated archive of XStore Core is attached in the private content. We recommend testing it on your staging website or making a backup of the current plugin version in case of any issues.

    If you continue to experience this issue, please clarify the steps to replicate it exactly as it occurs on your website, and we will attempt to recreate it on our side. Thank you for your understanding.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Content is visible for topic creator and
    support staff only.
    Avatar: Farhad
    Farhad
    Participant
    August 15, 2026 at 20:12

    The FEX.NET archive you provided is not accessible. It displays “Limited access — for extension of rights, contact the owner,” so I cannot download or test the modified XStore Core package.

    In the meantime, we completed the technical investigation ourselves and confirmed the issue is caused by stale Email Builder singleton state between customer_failed_order and the immediately following administrator failed_order.

    We implemented a small update-safe workaround using XStore’s existing public API at priority 9, immediately before XStore’s priority-10 handler:

    VIWEC\INC\Email_Trigger::init()->reset_template_id( array() );

    This successfully restores the complete XStore Failed Order template, and regression testing confirmed that the customer Failed Order notification and unrelated New Order templates continue working correctly.

    Please now confirm one of the following:

    Does XStore Core 5.7.7 contain an official fix for this specific state-leak issue?
    If yes, please identify the exact file/function or changelog item.
    If not, please attach your modified XStore Core archive directly to this support ticket/private area rather than using FEX.NET, and provide the exact code change/diff your developer made.

    The expected permanent correction is to reset the Email Builder state at the start of each Email_Trigger::trigger_recipient() processing cycle, including $use_default_temp, $template_id, and $unique.

    At this stage the issue is technically isolated and reproduced, so I do not need further generic troubleshooting steps. I need confirmation of the official fix and a usable patch/package.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 17, 2026 at 06:09

    Hello @Farhad,

    We tested the download action from FEX.net on our link and we could successfully download the zip with no issues.

    If you have implemented the correct fix for the issue you were able to replicate, could you please attach the code modifications so we can incorporate them into our next update? As we previously mentioned, we were unable to reproduce the issue on our end, and the fix was merely a suggestion that it might resolve the problem. We have attached private content links to download the zip from other sources. Regarding your request, the current versions v9.7.7 and Core plugin v5.7.7 do not include the fixes. If the fixes are found to be correct, they will be included in the next update.

    The changes in our attached archive are too numerous to detail, but we have also attached some basic templates that were modified in the private content.

    Best Regards,
    Jack Richardson
    The 8Theme’s Team

    Content is visible for topic creator and
    support staff only.
    Avatar: Farhad
    Farhad
    Participant
    August 17, 2026 at 17:29

    Thanks, Jack.

    We now have enough technical evidence to separate **two different XStore issues**:

    ## 1. Failed Order Email Builder bug

    We confirmed the problem is caused by stale state inside:

    VIWEC\INC\Email_Trigger

    WooCommerce sends the paired failed-order notifications in this order:

    1. customer_failed_order
    2. failed_order

    On our site there is no published XStore template for customer_failed_order, so XStore enables its Default-template fallback. The following administrator failed_order correctly finds our published XStore template, but the previous fallback state remains set and replaces the body with the Default template.

    Our published Failed Order template is:

    * Post ID: **20204**
    * Email type: failed_order
    * Subject: Choovio: Order Failed: #{order_number}

    The production workaround we implemented is intentionally very small and update-safe:

    add_filter(
        'woocommerce_email_recipient_failed_order',
        function ( $recipient, $order, $email ) {
            if ( class_exists( '\VIWEC\INC\Email_Trigger' ) ) {
                \VIWEC\INC\Email_Trigger::init()->reset_template_id( array() );
            }
    
            return $recipient;
        },
        9,
        3
    );

    XStore registers its own trigger_recipient() at priority 10, so this clears the singleton state immediately before XStore processes the administrator Failed Order email.

    We verified from the installed XStore source that reset_template_id() clears:

    $this->use_default_temp = '';
    $this->template_id      = '';
    $this->unique           = [];

    The workaround has been tested successfully in production:

    * Failed Order rich template: PASS
    * Customer Failed Order notification: PASS
    * New Order template regression test: PASS
    * Gmail delivery with full imagery/order details: PASS
    * No SMTP, recipient, order-data, or vendor-file modifications

    We also tested XStore Theme **9.7.7** / Core **5.7.7** and confirmed that the public 5.7.7 release does **not** contain this fix. Its affected email-trigger.php was byte-for-byte identical to the previous 5.7.6 version.

    Your newly supplied custom archive does appear to implement the correct broader upstream approach by resetting state at the beginning of the email-processing cycle. That is the correct place for the permanent XStore fix.

    Please confirm whether your development team intends to include that state reset in the **next official XStore Core release**, and if possible provide the expected version number.

    ## 2. Separate serious regression in XStore 9.7.7 / Core 5.7.7

    Unfortunately, when we updated production to the latest versions, the website frontend became severely corrupted.

    The update sequence was performed correctly:

    1. XStore Theme **9.7.6 → 9.7.7**
    2. XStore Core **5.7.6 → 5.7.7**

    Immediately afterward, the site experienced major frontend/theme-layout problems, including:

    * Header/navigation layout corruption
    * Incorrect/default-looking XStore header elements
    * Footer layout collapsing into a narrow column
    * Default XStore footer branding appearing
    * General theme/layout styling becoming inconsistent
    * XStore icon font requests returning errors

    We investigated the usual cache/CSS causes:

    * WP Rocket Remove Unused CSS was disabled
    * Used CSS was cleared
    * WP Rocket page cache was cleared
    * WP Rocket Preload remained OFF
    * Normal XStore 9.7.7 stylesheets were present and loading
    * Disabling our custom Failed Order workaround plugin did **not** correct the frontend

    We then restored the SiteGround backup from immediately before the XStore update.

    After the restore:

    * XStore Theme returned to **9.7.6**
    * XStore Core returned to **5.7.6**
    * The website frontend immediately returned to normal
    * Our Choovio XStore Failed Order Email Fix plugin remained ACTIVE

    This conclusively shows that our email workaround was **not** responsible for the frontend problem.

    The frontend regression was introduced by the XStore **9.7.7 / Core 5.7.7 update sequence**.

    We have therefore disabled/avoided automatic XStore updates and are currently keeping production on:

    * XStore Theme 9.7.6
    * XStore Core 5.7.6
    * Choovio XStore Failed Order Email Fix 1.0.0 active

    Please have your development team investigate this frontend regression as a separate issue before asking us to update production again.

    If you need additional evidence, we can provide:

    * Before/after frontend screenshots
    * Browser console/network captures
    * Installed version screenshots
    * Theme/Core update screenshots
    * The Failed Order workaround plugin source
    * XStore 5.7.6 / 5.7.7 source comparison
    * Technical deployment/test report
    * SiteGround restore evidence

    For the frontend regression, please let us know specifically what your developers need us to provide so they can investigate it directly.

    Given the amount of evidence now available, I would appreciate both items being escalated to the relevant XStore developer rather than continuing with general troubleshooting steps.

    The two requested outcomes are:

    1. **Failed Order Email Builder:** confirm the official XStore Core version that will include the state-reset fix.
    2. **XStore 9.7.7 / Core 5.7.7 frontend regression:** identify and correct the update-related theme/layout break before we attempt the update again.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 18, 2026 at 06:00

    Hello @Farhad,

    Thank you for updating us with the details. As you know, we strive to implement features and fixes in our archive for update that are globally beneficial for customers. However, with all due respect, the issue you identified in your email templates has not been replicated on our end, nor has it been reported by any of our customers. This suggests that the issue may be localized, and implementing a global fix could potentially cause issues on customers’ websites. Therefore, we kindly ask you to maintain the solution you found in your child-theme/functions.php or in a custom snippet plugin until we encounter similar issues on other customers’ websites, ensuring a safe solution for you and other users of our email customizer. We hope you understand our position.

    Regarding the issue with frontend regressions, it will not be a problem with the upcoming update. However, if you notice anything unusual, please feel free to provide temporary wp-admin access, and we will assist you as soon as possible.

    Best Regards,
    Jack Richardson
    The 8Theme’s Team

  • Viewing 11 results - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.