Skip to content Skip to sidebar

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

Problem:
You are trying to translate products using WPML, but encounter issues where the translated product shows a stock of zero, you cannot modify the stock, and adding translated products to the cart results in an empty cart.
Solution:
We found that the issue was due to multiple _stock entries in the database for the translated version, with one entry having a NULL value. This was likely caused by a custom code snippet intended to force stock levels. To fix this, we edited the database entries to ensure all translations have correct _stock values and deactivated the problematic code snippet. We recommend you test again to see if you can now add the translated products to the cart correctly.

If this solution does not resolve your issue or seems outdated, please check the related known issues and verify you have the latest versions of themes and plugins installed. If problems persist, we highly recommend opening 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.

This topic contains 24 replies, has 0 voices.

Last updated by Paola Mendiburu 8 months, 1 week ago.

Assisted by: Paola Mendiburu.

Author Posts
July 10, 2025 at 6:57 am #17221821

mohammadS-27

Background of the issue:
I am trying to translate my products on a site that is currently under development using WPML.

Symptoms:
When I translate a product that has stock, the translated version shows a stock of zero, and I can't modify it. Additionally, when I add any of the translated products to the cart, the cart remains empty and doesn't accept the products.

Questions:
Why does the translated product show a stock of zero?
Why can't I modify the stock of the translated product?
Why does the cart remain empty when adding translated products?

July 10, 2025 at 12:28 pm #17223847

Carlos Rojas
WPML Supporter since 03/2017

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

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

Hello,
Thank you for contacting us

1.- Please increase the WP memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:`

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');

- Add it above the line /* That's all, stop editing! Happy blogging. */

You can double-check the WordPress memory limit in WPML -> Support

2.- Once the WordPress memory limit then follow these steps:
- Edit a product in the original language
- Make a small change in the content of the product, especially in the variations or the price
- Save the changes
- Update the translation
- Flush any cache memory that might exist
- Double-check if the issue has disappeared

Regards,
Carlos

July 12, 2025 at 5:35 am #17229750

mohammadS-27

Yes, I have edited all the previous products and it worked, but this is not a solution.
Every time I translate a product, I have to open the translated product and make any change for it to get its stock.
I have a huge number of products, and this solution is not practical.

July 14, 2025 at 10:00 am #17232896

Carlos Rojas
WPML Supporter since 03/2017

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

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

Thank your feedback.

If you need to sync the information of the products in bulk, then you can go to Woocommerce -> Woocommerce Multilingual & Multicurrency -> Status tab -> Troubleshooting link (bottom right) -> Select the checkboxes necessary as described in this guide: https://wpml.org/documentation/support/wpml-troubleshooting-options/#troubleshooting-woocommerce-multilingual-and-multicurrency

Don't forget to flush all cache memory.

July 15, 2025 at 10:46 am #17237382

mohammadS-27

Still same problem

July 15, 2025 at 11:14 am #17237474

Carlos Rojas
WPML Supporter since 03/2017

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

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

Hi there,

1.- Please share a URL where the issue can be seen.

2.- Share the access credentials to the site in your next message, which I have set private. That way, I will be able to double-check the configuration and reproduce the issue.

3.- Are you creating these products manually or importing them?

July 15, 2025 at 12:57 pm #17237865

Carlos Rojas
WPML Supporter since 03/2017

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

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

Thank you for your message.

The product you shared has stock in the secondary language: hidden link

July 15, 2025 at 1:10 pm #17237927

mohammadS-27

check this product please
hidden link

Screenshot 2025-07-15 at 16-09-48 Products ‹ Cinafor — WordPress.png
July 16, 2025 at 8:08 am #17240436

Carlos Rojas
WPML Supporter since 03/2017

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

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

Thank you very much for sharing this URL. I was able to reproduce the issue, and to solve it, I had to re-save the product manually in Arabic.

Do you authorize me to activate/deactivate plugins and themes to run further tests to isolate the cause of this issue? If you authorize me, please confirm you have created a full site backup that you can restore if necessary.

As an alternative, you can create a staging site (using WP Staging for free) with a copy of the production site where we can safely run all the tests.

July 20, 2025 at 8:54 am #17252787

mohammadS-27

I create full backup for my web so you can do your test

July 21, 2025 at 9:28 am #17254496

Carlos Rojas
WPML Supporter since 03/2017

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

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

Thank you very much!

I ran several troubleshooting steps, but the issue persists. Do you authorize me to create a copy of the site to escalate this ticket to our 2nd tier of support?

July 21, 2025 at 9:49 am #17254628

mohammadS-27

ok

July 21, 2025 at 11:43 am #17255369

Carlos Rojas
WPML Supporter since 03/2017

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

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

Thank you very much for your authorization.

I have escalated this ticket to our 2nd tier of support, where our specialists will take a deeper look.

I will get back to you as soon as I get more information.

July 21, 2025 at 1:17 pm #17255746

mohammadS-27

ok, thank you

July 21, 2025 at 5:00 pm #17256886

Carlos Rojas
WPML Supporter since 03/2017

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

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

You are welcome!