AJAX search not displaying results on non-English pages

This topic has 4 replies, 3 voices, and was last updated 6 days, 19 hours ago ago by Tony Rodriguez

  • Avatar: Brunos
    Brunos
    Participant
    January 20, 2026 at 15:33

    Hello,

    I’m running a multilingual WooCommerce site with language prefixes (/en/, /fr/, /de/, etc.). A custom mu-plugin is being developed.

    Issue:

    On /en/ → AJAX search works perfectly ✅

    On /fr/ or any other language → AJAX search returns correct JSON but products don’t display ❌

    JSON response looks correct:

    json
    {
    “suggestions”: [{
    “id”: 63709,
    “value”: “White Wolf”,
    “add_to_cart_text”: “Choix des options”,

    }]
    }
    Questions:

    Is there a filter or hook I can use to normalize the add_to_cart_text field to English for AJAX search responses, regardless of the current page language?

    Or does XStore’s JavaScript expect specific text values that might not match translated strings?

    Is there a recommended approach or setting in XStore to make AJAX search work with multilingual setups?

    Thanks for your help!

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    3 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    January 20, 2026 at 17:02

    Hello, Brunos,

    Thank you for contacting us. The JSON response is completely correct; however, the issue is related to the further processing of the result. It occurs because the response in a non-English language contains symbols encoded differently. For example, in a correct response, you may find:

    • –
    •  
    • other entities such as € 

    In an incorrect response, you may find:

    • \u00a0 = NBSP (non-breaking space)  
    • \u2013 = en dash (–)  
    • \u00e0, etc. (accented characters)  

    Such differences cause errors in the subsequent parsing of the response.

    Best regards,
    8Theme Team

    Avatar: Brunos
    Brunos
    Participant
    January 21, 2026 at 11:00

    Thanks for the support! My topic “AJAX search not displaying results on non-English pages” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    January 21, 2026 at 11:00

    Dear Brunos,

    Thanks for being part of our WordPress & WooCommerce community!

    We’re happy we could assist you. Your feedback truly matters — it helps us make XStore better, faster, and more reliable with every release.

    Together, we’re shaping a better WooCommerce experience for everyone.

    Topic closed.
    The 8Theme Team

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

The issue related to '‘AJAX search not displaying results on non-English pages’' has been successfully resolved, and the topic is now closed for further responses

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