Skip Navigation

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

Problem:
Clients reported that product variations were not visible when changing the language, despite all attributes being translated.

Solution:
First, ensure that the "Adjust IDs for multilingual functionality" option is enabled. You can find this by navigating to WPML > Languages > Make themes work multilingual. Enabling this option should make the variation swatches appear in other languages.

Next, check if Object Cache is activated by going to Settings > Object Caches. If it is, try disabling it, as it may interfere with the display of variations in different languages. If you need to keep Object Cache enabled, try translating one product with the cache turned on to see if the issue persists.

If these steps do not resolve the issue or if the solution provided here is outdated or not applicable to your case, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Prosenjit Barman 10 months ago.

Assisted by: Prosenjit Barman.

Author Posts
February 18, 2024 at 10:04 pm #15315602

ricardoA-22

Hi,

I had clients reporting that they were not able to order because not variations were shown and its a fact, when I change the language they disappear but I have all attributes translated...

How can I fix it? Please check screenshots 1 and 2.

Thank you

NOTE: Something similar happened to me before: https://wpml.org/forums/topic/product-variations-are-not-showing-in-other-languages/

Tried the troubleshoot on the "WooCommerce > WooCommerce Multilingual > Status" section but doesn't work.

Screenshot at Feb 18 21-54-25.png
Screenshot at Feb 18 21-54-52.png
February 19, 2024 at 12:06 pm #15317997

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having. From the WPML Debug Information, I observed that the translation setting for the "Products" post type is configured as "Translatable - use translation if available or fallback to default language". This implies that in the absence of a translation for a product, the default language content will be displayed in other languages.

However, within the WPML Settings under the Taxonomy Translation section, the translation setting for the product attributes you've added is "Translatable - only show translated items". This indicates that these attributes will only be displayed if there is a translation for the product in the respective languages.

This discrepancy in translation settings between the Product Post type and its attributes (cor-da-caixa and tamanho) could be contributing to the issue you're experiencing.

To address this, you have a couple of options: Firstly, you could translate the main products into the other languages and verify if the variations are then displayed correctly. Alternatively, you could remove the translated terms and set the translation preference for the cor-da-caixa and tamanho attributes the same as the "Product" post type. In this way, the variations will also appear correctly as a fallback.

You can adjust the translation preference for the attributes by going to the "WPML > Settings > Taxonomies Translation" section.

After translating the products, ensure that you synchronize the attributes. This can be done by navigating to "WooCommerce > WooCommerce Multilingual > Attributes" and clicking the "Synchronize Attributes" button to perform the synchronization.

I hope you can understand. Please feel free to let me know if you need further clarification or assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

February 19, 2024 at 2:43 pm #15319093

ricardoA-22

Hi Prosenjit Barman,

Thank you so much for your answer.
I've tried that but it's not working, i need further assistance...

The product variations show in multiple sections and I think i'm confused. I've made some changes and synced in woocommerce multilinguee > attributes but nothing changed on product page.

I need products to show main language if they are not translated and I want product variations to be translated. I had this before, why isn't it working now?

Do you need to access my live site?

Screenshot at Feb 19 14-39-40.png
Screenshot at Feb 19 14-40-35.png
Screenshot at Feb 19 14-41-38.png
February 20, 2024 at 6:17 am #15320603

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the update.

I have reviewed the variation configurations and can confirm that they are set up correctly. In my development environment, the variations display as expected with the current setup, even when the product itself isn't translated, as long as the Attributes are.

However, during my examination, I noticed that you are using the "Woo Variation Swatches" plugin to alter the appearance of the variation swatches. It's possible that the plugin's settings were not transferred to the translated versions, leading to the variations not appearing correctly in other languages. Could you please try the following steps to see if it resolve the issue?

- Navigate to WPML > Settings and scroll down to the "Custom Term Meta Translation" section.
- Change the Translation preference for the "order_pa_cor-da-caixa" and "order_pa_tamanho" fields to "Copy". Remember to save your changes.
- Next, from your WordPress Dashboard, go to "Products > Attributes" and select "Configure Term" for the Terms related to each attribute.
- On the following page, you'll see a list of all terms linked to the Attributes. For each term, click on the "Quick Edit" button, make a minor edit, and then save.

Please repeat these steps for all attributes and terms associated with the product. This process ensures that any settings from the default attribute and term are replicated to their translated counterparts.

- After updating the terms, proceed to WooCommerce > WooCommerce Multilingual > Attributes tab, select the 'Cor da Caixa' attribute, and click on the "Synchronize attributes and update product variations" button. Do the same for the "Tamhano" Attribute as well.

Please give it a try and let me know how it goes. If you need further assistance, I'll take a closer look and suggest you on what to do next.

Best regards,
Prosenjit

February 20, 2024 at 8:30 am #15320888

ricardoA-22

Hi Prosenjit,

Thank you again for your support.
I've tried to follow the steps carefully but still doesn't work. Also purged cache from cloudflare and wp-rocket but keeps these atributes keep hidden...

February 20, 2024 at 9:14 am #15321118

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Thank you for patiently following the suggestions.

As the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

February 20, 2024 at 1:20 pm #15323001

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Thank you for sharing the access information.

It appears that the access provided does not include full administrative privileges, which is preventing me from accessing certain areas, such as the variation swatch settings and themes. Could you please grant me complete access so that I can proceed with the investigation?

Additionally, upon reviewing the theme code using the FTP access that you've provided, I noticed some custom modifications have been applied to the variation configurations in the Child theme. This could potentially be contributing to the issue. Could you try switching to the parent theme or a default theme, such as "Twenty Twenty-One," and see if the issue persists?

If switching themes resolves the problem, it might be necessary to recheck the custom variation code or logic to ensure compatibility with WPML. Since providing support for custom code falls outside our standard support boundaries, it will be better to consult with the developer who implemented the custom variation code.

Let me know the update, please!

Best regards,
Prosenjit

February 20, 2024 at 1:39 pm #15323088

ricardoA-22

Hi, please try again, full permissions were restored.

about yout houghts on custom css, i don't think that's the cause. On live site I've been playing with wpml > settings and I managed to see the box color variations on frontend, but they're in main language only, not translated (at least clients using my website in other languages can add product to cart and finish purchase).

Please check again my staging and let me know if you find something please 🙏

February 21, 2024 at 5:34 pm #15329751

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the update and your patience.

I've thoroughly checked the staging site and have successfully identified the root cause of the issue. The issue was mainly happening due to keeping one of the important configurations of WPML disabled, which is "Adjust IDs for multilingual functionality".

When I enabled the option by going to "WPML > Languages ↳ Make themes work multilingual", the variation swatches started to appear in other languages. Please check this screenshot from the English version: hidden link

However, I also noticed that activating the Object Cache (via Settings > Object Caches) disrupts the functionality of Variations in different language versions. As soon as I disable the Object caching, the variation appears correct in each language.

Given that Products are set up to show default language content when translations are unavailable, it appears the object cache may not be effectively handling this configuration. Could you please try translating one product, keeping object caching turned on to see if the issue persists?

Let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit