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!