Skip to content Skip to sidebar

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

Problem:
You are trying to ensure that products in a second language have a default variation selected, but despite upgrading WPML WooCommerce Multilingual to version 5.5.2.3, the issue persists.
Solution:
We recommend modifying a specific file to address this issue. Please follow these steps:
1. Open the file

/wp-content/plugins/woocommerce-multilingual/classes/Synchronization/Component/Attributes.php

.
2. Change the following section:

$defaultTermTranslations = $defaultTerm ? $this->elementTranslations->get_element_translations( $defaultTerm->term_taxonomy_id, false, true ) : [];

to:

$defaultTermTranslations = $defaultTerm ? $this->elementTranslations->get_element_translations( $defaultTerm->term_taxonomy_id, false, false ) : [];

3. Save the original product to trigger a synchronization, which should assign the proper default attribute.

If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open 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 22 replies, has 0 voices.

Last updated by Kor 5 months, 1 week ago.

Assisted by: Kor.

Author Posts
November 19, 2025 at 8:39 am #17590446

kevinB-74

I activated again the account. Same credentials

November 19, 2025 at 4:27 pm #17592751

Kor

Thanks for your patience. I've shared your feedback with our 2nd Tier Support and they will look into this again.

November 26, 2025 at 8:11 am #17610296

kevinB-74

Hi,

I didn't get any news. Were you able to solve my issue?

November 26, 2025 at 8:22 am #17610347

Kor

Thanks for your reply. My apologies for the delay. Our 2nd Tier Support shared a workaroud and could you please try and let me know if it works for you?

Workaround
Open this file /wp-content/plugins/woocommerce-multilingual/classes/Synchronization/Component/Attributes.php

change this section:

$defaultTermTranslations = $defaultTerm
						? $this->elementTranslations->get_element_translations( $defaultTerm->term_taxonomy_id, false, true )
						: [];

to:

$defaultTermTranslations = $defaultTerm
						? $this->elementTranslations->get_element_translations( $defaultTerm->term_taxonomy_id, false, false )
						: [];

Then, just save the original product, and this should trigger a sync, and the proper default attribute should be assigned. Let me know how it goes.

November 26, 2025 at 10:26 am #17610924

kevinB-74

I confirm this workaround works.
Will I still be able to get WPML updates of will it break my webstite?

November 26, 2025 at 10:33 am #17610939

Kor

Thanks for your reply. We've forwarded this to our devs, and they will review and add this fix to the upcoming updates.

November 26, 2025 at 10:37 am #17611000

kevinB-74

awesome thanks

November 26, 2025 at 11:01 am #17611087

Kor

Thanks for your reply. I will mark this ticket as resolved.