Wrong textdomain in single-product-reviews.php override causes untranslated string

1 reply2 participantsUpdated by Jack Richardson

  • Avatar: kikjou
    Martin
    Participant

    Hi,

    I found a bug in the WooCommerce template override that ships with XStore.

    File: wp-content/themes/xstore/woocommerce/single-product-reviews.php

    This file overrides WooCommerce’s core single-product-reviews.php template. In the verification-required branch, the string is output like this:

    <p class="woocommerce-verification-required"><?php esc_html_e( 'Only logged in customers who have purchased this product may leave a review.', 'xstore' ); ?></p>

    The textdomain here is xstore, but this is a core WooCommerce string (it belongs to the woocommerce textdomain). Because of this, it never picks up the correct translation from WooCommerce’s own, fully translated language file, and it’s missing from your xstore theme translation files too (I checked xstore-de_DE.mo and this one isn’t among them). The result: the message always shows in English.

    Could you please change the textdomain back to woocommerce in this string (so it inherits WooCommerce’s own, already-complete translation automatically), or add the string to XStore’s own translation files if you intend to keep it under the xstore domain.

    I’ve worked around it locally with a filter for the time being.

    Thanks,
    Martin

    1 Answer

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @Martin,

    If the text is located in theme files, it should follow the theme’s text domain, as the string or string line can be modified in our rewritten file. Please note that this string was only released in the latest WooCommerce update about a week ago, so we have not yet updated all our translation files with the updated version. However, we update them regularly, so rest assured it will be fixed in due course. In the meantime, you can use the filter solution you found. Thank you for your understanding and for respecting our support time.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

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

Login / Register