Hello, after years of use, today I have encountered a problem when adding a product to cart: some products were added and immediately after removed.
I did any kind of test, including optimizing the database and running Clean-up features in your Troubleshooting section with no result.
I finally found out that products without translation were the reason. Not all products in the main language (Italian) were translated into English, and untranslated products could not be added to cart.
Adding the translation to such products made add to cart possible.
In WPML > Settings > Post types translation > Products I tried to switch from "Only show translated items" to "Use translation if available or fallback to the default language" and this solved the problem.
Please let me know:
1) Is this the correct fix to this problem?
2) Now untranslated italian products have english translations with english URL and italian text: can this be a SEO issue (duplicated content)?
3) Why did this happen? I have had no such problems until now.
Any other comment will be much appreciated.
Thank you.
While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.
1) Yes, using “Use translation if available or fallback to the default language” for Products should normally work fine. I have just tested this behavior and products without translations should still be purchasable and added to cart using the fallback to the default language.
Note this will not work other way around and it is expected, from 2nd language to first. Fallback works only from default language.
2) As for why this started happening now, it is difficult to say without checking the site further. It could be related to a recent update, a configuration change, or a compatibility issue with another plugin.
If possible, test the behavior with only WPML plugins and WooCommerce active, and using a default WordPress theme (for example Twenty Twenty-Five) to see if the issue still occurs.
This will help us determine whether the problem is related to WPML itself or caused by a theme/plugin conflict.
Hello Drazen, thank you for your reply.
Unfortunately I did not get the e-mail notification about your reply, and now, in order not to let this post be closed, I am answering it quickly, and I will let you know shortly after.