Custom “Buy Now” button shows untranslated text on out-of-stock products

2 replies2 participantsUpdated by Martin

  • Avatar: kikjou
    Martin
    Participant

    Hi,

    I’m running XStore (child theme) on a WooCommerce shop and found a bug with the custom “Buy Now” button on single product pages.

    Setup:

    The “Buy Now button” option under Theme Options → General → Layout is disabled (toggle is off).
    Site language is German, and the regular WooCommerce add-to-cart button correctly shows “In den Warenkorb” everywhere.

    Issue:
    Despite the Buy Now option being disabled, a separate button with the class etheme_custom_add_to_cart still appears on product pages, but only when the product (or its default/selected variation) is out of stock. On in-stock products this element isn’t rendered at all. The button shows the untranslated, hardcoded text “Buy now” instead of a German label, and it appears regardless of the Theme Options setting.

    Example URLs:

    Out of stock (bug visible): https://www.pflanzkompass.at/artikel/iris-foetidissima/
    In stock (no bug, element doesn’t exist in the DOM): https://www.pflanzkompass.at/artikel/phlox-divaricata-subsp-laphamii-chattahoochee/

    Markup on the affected page:

    html
    <div class=”etheme_custom_add_to_cart button single_add_to_cart_button pointer”>Buy now</div>

    This sits right after the wishlist and compare icons in the product summary, and is also cloned into the sticky add-to-cart bar.

    I already tried clearing the Redis object cache and W3TC page cache (confirmed no change while logged in as admin, where page cache is bypassed anyway), so this doesn’t look like a caching issue but rather a fallback that’s shown for unavailable products independently of the Buy Now setting, and without going through translation.

    Could you confirm whether this is a known issue, and how to either disable this fallback button entirely or make its label translatable?

    Thanks,
    Martin

    2 Answers

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, Martin,
    We have noticed that your website is utilizing a large number of plugins. This could potentially impact the website’s performance, lead to errors, and affect its overall speed. To ensure optimal functionality and avoid such issues, we kindly ask you to manually review each plugin currently in use on your website.

    If the problem persists, we suggest switching to the Parent theme if you are currently using the Child Theme on your site. After clearing the cache, check again.
    Do the same test for the default WooCommerce theme – Storefront. The issue may be due to your custom code in the Child Theme.

    Let us know the results.

    Best regards,
    8Theme’s Team

    Avatar: kikjou
    Martin
    Participant

    Hello,

    do not try to get rid of me with such a generic, nonsensical and ridiculous reply!

    This is a serious support ticket, I am paying for support and I expect that you look at the issue seriously.

    Investigate and give me an hands-on and on-topic reply.

    Regards
    Martin

Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.

Login / Register