Skip Navigation

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

Problem:
You are trying to translate custom product attribute names in a WooCommerce multilingual setup using WPML tools, without using String Translation. The custom attributes do not appear translated on the frontend in secondary languages, although they are visible and translatable in the Advanced Translation Editor.

Solution:
We are planning to implement a feature to properly import local translated attributes in a future update of WPML. Meanwhile, we recommend a workaround:
1. Ensure you have a full website backup.
2. Add the following code to your functions.php file:

&#47;**<br /> * Force unserializing of meta data in WC importer.<br /> *&#47;<br />add_filter('woocommerce_product_importer_parsed_data', function ($data) {<br />    if (isset($data['meta_data']) && is_array($data['meta_data'])) {<br />        foreach (array_keys($data['meta_data']) as $k) {<br />            $data['meta_data'][$k]['value'] = maybe_unserialize($data['meta_data'][$k]['value']);<br />        }<br />    }<br />    return $data;<br />});

3. Add an extra column 'Meta: attr_label_translations' to your CSV file.
4. Populate this column with serialized values for the attribute label translations. Use the structure [ 'LANGUAGE_CODE' => [ 'ORIGINAL-ATTRIBUTE-NAME-SLUG' => 'TRANSLATED ATTRIBUTE NAME', ], ] and serialize the array using this link.
5. Follow your usual workflow to import products.

This solution might be outdated or not applicable to your specific case. If it doesn't resolve your issue, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance.

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 15 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 2 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
June 12, 2025 at 5:57 pm #17131131

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

This ticket will get closed after 14 days of inactivity, that's automatic. If possible, please send a message here, before that period expires. Thank you.