Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where the 'Add to Cart' buttons in a WooCommerce shop integrated with WPML/WCML are adding the wrong products to the cart across different languages. The buttons link to incorrect product IDs or to the base language product ID.

Solution:
1. Navigate to WPML → Settings → Custom Fields Translation.
2. Search for the custom field related to product IDs, such as 'woosb_ids' or 'product_ids'.
3. Set the relevant custom field to 'copy'. This ensures the product IDs are correctly synchronized across translations.
4. Save the changes.
5. Edit the original product (even a small change like adding a space) and save it. Then, update the translation via the WPML Translation Editor or Translation Dashboard to resync the product data.
6. Clear all website and browser caches, then test the 'Add to Cart' functionality in each language.

If the issue persists or if you are using any custom product types or WooCommerce extensions, it might be necessary to check for compatibility issues with WPML. In such cases, or if this solution does not resolve the issue, we recommend visiting our support forum for further assistance. Additionally, always ensure to check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins.

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.

This topic contains 1 replies, has 0 voices.

Last updated by Carlos Rojas 1 week, 5 days ago.

Assisted by: Carlos Rojas.

Author Posts
October 2, 2025 at 12:07 pm #17451938

woutV-2

Background of the issue:
I am trying to resolve an issue with the Add to Cart functionality in my WooCommerce shop, which is integrated with WPML/WCML. The issue is visible on both single product pages and in the loop grid (shop archive). The problem can be seen on pages like hidden link or other product pages.

Symptoms:
The Add to Cart buttons add the wrong product to the cart. The images, titles, and prices are displayed correctly per product and per language, but the Add to Cart button link is incorrect. In every language, the same button adds a different (incorrect) product to the cart. The href under the button points to another product ID or to the base language product ID.

Questions:
How can I resolve the issue of Add to Cart buttons adding the wrong product in a multilingual shop?
Why are the Add to Cart links no longer consistently using the correct translated product IDs?

October 2, 2025 at 12:53 pm #17452136

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi there,
My name is Carlos, and I will continue working on this ticket

I created this video: hidden link describing the steps I followed to add the product you mentioned (hidden link) to the cart, and as you can see, there is no problem. I kindly ask you to create a video (you can use Loom, Komodo, or any other free tool) and share the link here so we can see the steps to reproduce the issue.

Looking forward to your message.