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 16 replies, has 2 voices.

Last updated by thomasK-90 5 months ago.

Assigned support staff: Vincenzo.

Author Posts
May 3, 2019 at 5:47 pm #3737299

thomasK-90

My woocommerce product stock are not synchronized.
I tried Sync product stock quantity and status but didn't help. It says 388 left and after the process is done, the number return from 0 to 388.

May 4, 2019 at 12:51 pm #3740329

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello, thank you for contacting WPML Support!

Can you please verify if, when updating an original product, the stock in the translated versions is synchronized?

1. If that's the case, you can try performing a bulk update.
See the following articles about it:
- hidden link
- hidden link

2. The troubleshooting procedure to sync the stock products shows the number of affected products, not the number of products out of sync.
- Please verify if the stock quantity has been fixed after the procedure is complete.

3. If the stock quantity is not synchronized after the procedure is complete, please try these steps, preferably on a staging version of the site:
❌ Before proceeding please make a full website backup! ❌
- Clean up the cache of any cache plugin.
- Disable all the plugins except WPML and its add-ons, WooCommerce and WooCommerce Multilingual
- Set a default theme (eg. Twenty Sixteen).
- Execute the troubleshooting procedure to sync the stock status in WooCommerce -> WooCommerce Multilingual -> Status -> Troubleshooting page
- If the issue is solved, please re-enable the Plugins one after the other, and check the issue each time you enable a plugin.
It might also be due to the Theme.
Please do reactivate your Theme only after you are sure the issue isn't coming from a 3rd Party Plugin.

- Please report me when the issue comes back.

Thank you

May 6, 2019 at 4:34 pm #3751189

thomasK-90

I tired your suggestion on my staging site. But the problem is still there.
Now I only have WPML and its add-ons, WooCommerce and WooCommerce Multilingual active with Twenty Sixteen theme.
When I do troubleshooting procedure to sync the stock status, nothing changes.
When I do the bulk update, then everything on my translated version becomes out of stock.

May 7, 2019 at 8:55 am #3755593

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

to further debug the problem I’d like to replicate your staging site locally.

I would need a site snapshot if possible.
We usually recommend the free Plugin “Duplicator” for this purpose.

If you already know how Duplicator works
(https://wordpress.org/plugins/duplicator/),
please skip the following steps and just send me the archive file you downloaded.

★ Duplicator Instructions
hidden link
https://wpml.org/faq/provide-supporters-copy-site/

If the file is too large (more than 500M), please use the Duplicator file filters to remove the cache, the wp-uploads directory, the media, and the archive files.

Send me the link to the archive file (you probably want to use Google Drive, Dropbox, or similar services, as the snapshot file will be quite big)

Your next reply will be private, which means that only you and I will be able to see it and have access to it. You can paste the link to the file there. You can also share the credentials to your website. I will then download the file from the admin panel.
Once the problem is resolved I will delete the local site.

Please let me know if you need help creating the Duplicator package.

Thank you

May 8, 2019 at 2:03 pm #3767487

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

thank you for the Duplicator files.

I installed the site on my local server and did all the needed tests.

It seems like the issue is caused by the fact that the Product attributes are set as "Not translatable".

To fix the issue, try these steps:
❌ Before proceeding please make a full website backup! ❌

- Go to WPML -> Settings
- Scroll down to the "Taxonomies Translation" section
- Set all the product attributes (eg. Product Size pa_size) to "Translatable - use translation if available or fallback to default language"
- Save

If this does not fix the issue, try to apply again all the troubleshooting tools in WooCommerce -> WooCommerce Multilingual -> Status -> Troubleshooting page

Please let me know if this solves the issue or if you need further details.

Thank you

May 8, 2019 at 4:49 pm #3769277

thomasK-90

OK, I tried your suggestion. Now all the product attributes are set as translatable.
But then all attributes association with products with variation are gone.
When I go to attribute page, then all the options are in English but not in Japanese. So when I go to product page, then size option is not showing XS in the list.

Also OUT OF STOCK issue is still there.

May 9, 2019 at 8:19 am #3774097

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

Product attributes set as "Not translatable" were the main cause of the issue. This caused other issues with the variations.

Now, you need to fix the variations by either resaving them or using the troubleshooting tools available in WooCommerce -> WooCommerce Multilingual -> Status -> Troubleshooting page and in WPML -> Support -> Troubleshooting

Verify also if the issue is still there on new variable products.

Thank you

May 9, 2019 at 8:51 am #3774299

thomasK-90

I did "Fix translated variations relationships" and it didn't change anything.
In WPML -> Support -> Troubleshooting, I am not sure which one I should do.

When I try to add the new variable product, then variations are missing as they are not translated in Japanese. As I showed in the previous image, all variables are nowin English but not in Japanese available. When I go to each size option, then the original Japanese language not available and if I go to add new XS in Japanese, I cannot select the existing XS in English as its translation.

May 10, 2019 at 12:06 pm #3784017

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

I did a new test by deleting my local copy of the site and installing it again.

Once I installed the Duplicator copy, I can see that the English products are Out of stock.

These are the steps I made to fix the issue:
- Go to WPML -> Settings
- Scroll down to the "Taxonomies Translation" section
- Set all the product attributes (eg. Product Size pa_size) to "Translatable - use translation if available or fallback to default language"
- Save
- If you get a warning about the translation of product_type, fix it according to the instructions in the notice.
- Go to WooCommerce -> WooCommerce Multilingual -> Status -> Troubleshooting page
- Select all the troubleshooting boxes
- Press the Start button

This fixed the Out of stocks for the English products in my local copy.

About the attributes, if they need to be translated, you can do it from WooCommerce -> WooCommerce Multilingual -> Attributes

See: https://wpml.org/documentation/related-projects/woocommerce-multilingual/#taxonomies

May 10, 2019 at 12:27 pm #3784149

thomasK-90

OK, I followed your steps again and now out of stock issue was fixed.
- Select all the troubleshooting boxes
Maybe this was the key.

But I cannot translate attributes as they don't appear in
WooCommerce -> WooCommerce Multilingual -> Attributes
although they are in attribute page.

May 10, 2019 at 1:45 pm #3785107

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

thank you for the update.

To fix this issue with the missing attributes, can you please try these steps?
❌ Before proceeding please make a full website backup! ❌

- Go to WPML -> Support -> troubleshooting
- Press the following buttons:
- "Clear the cache in WPML"
- "Remove ghost entries from the translation tables"
- "Fix element_type collation"
- "Fix WPML tables collation"
- "Set language information"
- "Fix terms count"
- "Fix post type assignment for translations"

The issue, in my local copy, was fixed after the last button press.

Please let me know if this solves the issue or if you need further details.

Thank you

May 10, 2019 at 2:14 pm #3785325

thomasK-90

Great, these steps helped fixing the translation problem.
However, still all the products with variations have lost its variations when I set all the product attributes to "Translatable - use translation if available or fallback to default language".
Originally I created them in my original language (Japanese) and then when I did the step before, then all the attributes moved to English somehow. So even now when I translated all the variables again, they are not associated with the product. If I switch to English in admin then go to product page, then option is associated with the variation.
Do I have to edit each product one by one to re assign attributes?

May 10, 2019 at 5:11 pm #3786995

thomasK-90

Is there any ways to keep attributes in Japanese instead of English when I set all the product attributes to "Translatable - use translation if available or fallback to default language"? Then this issue is is simple to fix by just translating the attributes.

May 10, 2019 at 5:42 pm #3787137

Vincenzo
Supporter

Languages: English (English ) Italian (Italiano )

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

Hello,

the only way to change the language of the terms of the attributes is by editing the single term from Products -> Attributes -> Configure terms.

But I am not sure if, after changing the language, the terms will be automatically added to the products.

Did you try to press the "Copy to all languages" link in WooCommerce -> WooCommerce Multilingual -> Attributes to translate all the terms from English to Japanese?

Thank you

May 10, 2019 at 5:55 pm #3787263

thomasK-90

Yes I did press "Copy to all languages". That's why all the attributes are translated but not associated.
For Japanese are no products associated with each attribute (only one XS is the one I manually edited in the product page.)