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 5 months, 1 week ago.
Assisted by: Kor.