This thread is resolved. Here is a description of the problem and solution.
Problem:
The client reported that product attributes and variations were not displaying in the English language version of their WooCommerce site, despite tags being fixed when editing the main language version.
Solution:
We acknowledged the issue as a known bug and provided a code adjustment to resolve it. The client needs to modify the code in
woocommerce-multilingual/classes/Synchronization/Component/Taxonomies.php
. Specifically, they should find the following section:
private function runForTranslation( $productId, $translationId, $language ) {<br /><br /> $taxonomyExceptions = [ 'product_type', 'product_visibility' ];<br /> $taxonomies = $taxonomyExceptions;<br /> if ( $this->sitepress->get_setting( 'sync_post_taxonomies' ) ) {<br /> $taxonomies = get_object_taxonomies( 'product' );<br /> }
And change it to:
private function runForTranslation( $productId, $translationId, $language ) {<br /><br /> $taxonomyExceptions = [ 'product_type', 'product_visibility' ];<br /><br /> $attribute_taxonomies = wc_get_attribute_taxonomies();<br /> $taxonomy_slugs = array_map( function( $attribute ) {<br /> return wc_attribute_taxonomy_name( $attribute->attribute_name );<br /> }, $attribute_taxonomies );<br /><br /> $taxonomies = array_merge( $taxonomyExceptions, $taxonomy_slugs );<br /><br /> if ( $this->sitepress->get_setting( 'sync_post_taxonomies' ) ) {<br /> $taxonomies = get_object_taxonomies( 'product' );<br /> }
We advised the client to ensure they have a backup before making these changes. If this solution does not resolve the issue or seems irrelevant due to updates or different circumstances, we recommend checking related known issues, verifying the version of the permanent fix, and confirming that the latest versions of themes and plugins are installed. If further assistance is needed, 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.
This topic is split from https://wpml.org/forums/topic/split-my-tag-on-the-english-website-also-disappears/
This topic contains 23 replies, has 0 voices.
Last updated by 1 week, 3 days ago.
Assisted by: Dražen.