This thread is resolved. Here is a description of the problem and solution.
Problem: The client is unable to add products to the cart on a multilingual site when the products are in a language other than Italian, despite having enabled 'Language filtering for AJAX operations' in WPML → Languages. Solution: We discovered that adding products directly from the product page works, but not from the product category page. Additionally, the homepage was not translated into other languages, which could be related to the issue. We recommended translating the homepage into all required languages and then clearing the site's cache to ensure the changes take effect.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am working on a site under development and I am trying to add products to the cart using WPML. I have flagged the 'Language filtering for AJAX operations' section in WPML → Languages.
Symptoms:
I can’t add products to the cart when they are in a language other than Italian.
Questions:
Why can’t I add products to the cart when they are in a language other than Italian?
The debug information you added is from [removed link].
Is this a problem with [removed link] or another site you are currently developing?
Please explain to me how to see this problem on your site, and if necessary, give me access to your site.
If you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply. Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ **IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--
It works when I add a product to the cart directly on a product page. Please see the attached screenshots: add-to-cart-on-product.jpg and product-on-cart.jpg. However, it does not work from a product category page, such as here: [removed link].
The homepage of your site is not translated into any language. Please see the attached screenshot home-not-trans.jpg. This might be related to the problem.
Please translate the homepage into all the other languages and check again. Before you test this, please remember to clear your site's cache.
Hi Itamar, i have solved, great support, I have another favor to ask.
You can omit the reference site in the ticket since it is public? The customer does not want to be in the ticket
Thank you in advance
For your information, our forum is public, but external links in this ticket are only visible to you and us (the support team). However, I removed the links and screenshots from this ticket at your request.