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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | - | - |
16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | - | - |
Supporter timezone: Asia/Jerusalem (GMT+03:00)
Tagged: Documentation request, WCML
Related documentation:
This topic contains 35 replies, has 1 voice.
Last updated by Itamar 1 month, 1 week ago.
Assisted by: Itamar.
Author | Posts |
---|---|
August 10, 2025 at 7:55 pm #17307938 | |
robertM-124 |
Hi, Thank you! -Regards |
August 11, 2025 at 9:52 am #17308956 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Sure, thanks for your update. I'll be waiting to hear from you if you need further help with this issue. Regards, |
August 12, 2025 at 6:57 pm #17314899 | |
robertM-124 |
Hi, So I tried the method (https://wpml.org/forums/topic/we-need-a-way-to-translate-custom-product-attribute-names-imported-via-wpml-tools-without-using-str/) and the local attributes keep disappearing after an edit. I am not sure if I did that correctly though. Could you please check? Code used: $attrLabelTranslations = ['ka' => ['attribute:ცხობის მასის პარამეტრები' => 'attribute:Baking Mass Settings',],['attribute:ქერქის ფერი' => 'attribute:Bark color (level)',],['attribute:მასალა' => 'attribute:Material',],['attribute:კაბელის სიგრძე (მ)' => 'attribute:Cable length (m)',],['attribute:ზომები (სმ)' => 'attribute:Size (cm)',],['attribute:წონა (კგ)' => 'attribute:Weight (kg)',],['attribute:მოდელის/ნაწილის ნომერი' => 'attribute:Model/Part Number']]; echo serialize( $attrLabelTranslations ); Result: The product uploaded and tried editing on the testing server you set-up: hidden link Best regards |
August 14, 2025 at 4:43 pm #17321745 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Thanks for trying the workaround. I assume you are referring to the მოდელის/ნაწილის ნომერი custom attributes. If so, I observe a few problems. A. This attribute was not even imported correctly in Georgian. Only the forward slash (/) is there. Please see the attached screenshot forward-slash.jpg. It might be that it is not possible to include this sign in an attribute label. (This is just an assumption from my side.) So, not being imported into Georgia can be the root of the problem. B. As far as I can see, you have not added the following functions to the functions.php file of the active Twenty Twenty-One theme. /** * <em><u>hidden link</u></em> * * Force unserializing of meta data in WC importer. */ add_filter( 'woocommerce_product_importer_parsed_data', function ( $data ) { if ( isset( $data['meta_data'] ) && is_array( $data['meta_data'] ) ) { foreach ( array_keys( $data['meta_data'] ) as $k ) { $data['meta_data'][ $k ]['value'] = maybe_unserialize( $data['meta_data'][ $k ]['value'] ); } } return $data; } ); I'm sorry that this code is broken on the link I sent you. I've just fixed it. C. Your PHP and, in turn, the serialized array are not following this format: [ 'LANGUAGE_CODE' => [ 'ORIGINAL-ATTRIBUTE-NAME-SLUG' => 'TRANSLATED ATTRIBUTE NAME', ], ] It is supposed to look something like this, for example: [ 'ka-ge' => [ 'მოდელის-ნაწილის-ნომერი' => 'Model/Part Number', ], ]; And it is supposed to be for each attribute separately and not as you put it all together. In any case, writing these lines now, I'm not sure it is the solution for you. I need to consult our second-tier supporters about it. I'll keep you updated about this. However, I still think you should stick to the guide here: wpml:language_code wpml:original_product_id I know you said you mapped them. But I think that the columns must be there. Please note that my weekend hours are Friday to Saturday. If you need further assistance, I'll be available to continue checking this issue and helping you next week. Regards, |
August 18, 2025 at 4:40 pm #17328962 | |
robertM-124 |
Hello Itamar, thank you for the breakdown. I need a little more information on the "[ 'ka-ge' => [ 'მოდელის-ნაწილის-ნომერი' => 'Model/Part Number', ], ];" field you want to see in the import file. I can see an interrupted inner and outer arrays. Also, the elements of the array contain the labels only, not the values. The guide from the link also does not include any values, just the labels in the custom meta field: 3. Add an extra column 'Meta: attr_label_translations' to your CSV file. The link to the PHP sandbox from the guide suggests a short code of the translation language (not original): ```<?php $attrLabelTranslations = [ echo serialize( $attrLabelTranslations ); ``` So, I did the following. * If it assumes I use the standard WP import and I need to put the [ 'LANGUAGE_CODE' => [ 'ORIGINAL-ATTRIBUTE-NAME-SLUG' => 'TRANSLATED ATTRIBUTE NAME', ], ] in the "attribute name" field, then it's unclear why the nested and outer array have extra commas. * Also, in that case that would be unclear why I need "Meta: attr_label_translations" field and what should I put there. Testing: Uploaded without errors, translations applied. Final result: Locals disappeared. Best Regards |
August 21, 2025 at 1:06 pm #17337593 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Our second-tier supporter wrote the following about this case:
In light of this, I suggest you try again when the Advanced Translation Editor is canceled. In other words, although it is less convenient, don't work with the Advanced Translation Editor for products that you imported with the Product Import Export for WooCommerce Add-on plugin. You cancel it in the editing screen of each product. You can cancel it for a specific product or all products. Please see the attached screenshot. Then make a new import and check what happens in this case. If the answer is yes, then we must escalate this ticket to our second-tier supporter with a copy of the sandbox site. For this, I want to ask you the following, please (on the sandbox site). 1. Simplify as much as possible your CSV. I mean, reduce the number of columns to the minimum required. Just include the columns needed to replicate the problem. Also, please add just one or two products to this file. This will make the file more manageable and easier to understand. 2. Share with us this file. You can upload it to a service like Google Drive or Dropbox and share the link with me. Or explain where we can find it on the site. 3. Write to us the steps to reproduce the problem. Start from the import process and then move to the steps that trigger the problem. Please write in steps: 1. 2. 3... and so on. It would also be helpful if you could share a clear video on the above steps, where you are explaining what you do. You can use the free online screencast service Komodo - hidden link. This should help me see if you do anything wrong. Then I'll create a copy of the sandbox site and escalate it to our second-tier supporters. Please note that my weekend hours are Friday to Saturday. If you need further assistance, I'll be available to continue checking this issue and helping you next week. Thanks, |
The topic ‘[Closed] Products tables desyncronization’ is closed to new replies.