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: Compatibility
This topic contains 18 replies, has 1 voice.
Last updated by Otto 3 days, 1 hour ago.
Assisted by: Otto.
| Author | Posts |
|---|---|
| November 20, 2025 at 10:36 am #17594905 | |
|
jeanneK |
Background of the issue: Symptoms: Questions: |
| November 20, 2025 at 10:40 am #17594914 | |
|
jeanneK |
Two issues : Go to Product Options (specific to Customer0 |
| November 20, 2025 at 2:41 pm #17596186 | |
|
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, To ensure the quickest and most accurate support, please provide your debug information so I can look at some of your configurations. We have an excellent article on how to locate it here: https://wpml.org/faq/provide-debug-information-faster-support/. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. The information you will enter is private which means only you and I can see and have access to it. **IMPORTANT** Best Regards, |
| November 21, 2025 at 7:47 am #17597563 | |
|
jeanneK |
Thank you Otto, I did not recive an email notifying me that you had responded and just saw your message now when I logged in. Please tell me what email address to enter into the add user page for you. With thanks, |
| November 21, 2025 at 7:50 am #17597581 | |
|
jeanneK |
And can you send me an email when you reply. ioanna @gardensofdiscovery.org I will be away from the laptop shortly for about 3 hours. for a few hours. If you receive this msg now - please send your email so I can add you as a user. With thanks, |
| November 21, 2025 at 4:13 pm #17599853 | |
|
jeanneK |
I have not yet seen Otto's reply from about 3 hours ago. I replied in the ticket: Best Regards, But I do not know where to access thatfor the link brings me here, and there is no reply here. Please advise, |
| November 21, 2025 at 4:49 pm #17599988 | |
|
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello Jeanne, I am sorry for the trouble. But we need you to share the access details in the form. I enabled again a private reply, so the next time you should see a field to add the credentials. You need to be logged to wpml.org with the user jeanneK to see them. Best Regards, |
| November 21, 2025 at 7:16 pm #17600455 | |
|
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Related to the string "Estimated Cost", this is the problem: Can you please try the workaround suggested there? Regarding the options' product strings, the WooCommerce Product Options plugin documentation claims that it should be translated via WPML > String Translation: I noted that they are already translated but don't display in the front end. I also noted that the cart in English uses the regular WooCommerce cart, but in Greek it uses a different version, which seems to use Javascript. And that may be the reason why it's not translating. The cart translation needs to be updated, so it's synched with the default language cart. Please try the following: I made a copy of your site to debug, but I can't test this myself because the WooCommerce Product Options license deactivated in my local environment. Do they provide development keys? If so, can you share it with me so I can test it? If needed, the URL of my local site is: hidden link Let me know how this goes. Best Regards, |
| November 21, 2025 at 7:40 pm #17600527 | |
|
jeanneK |
Thanks, I've tried Estimated Total - still not found I tried both workarounds either with Maya or the support assistant a day or so ago. He then asked for credentials and I had to ask our developer to back up - and that support person closed that ticket in the mean-time. Re Barn2 for developer - nothing needed I'll now try the product options advice. |
| November 21, 2025 at 7:48 pm #17600534 | |
|
jeanneK |
On the Product Options - I went to the Greek page - but the cart is empty. This is all the text I see - screenshot attached. I am getting out of my depth here with .po and mo files etc. If I can get you access - this would be great. With thanks, |
| November 21, 2025 at 7:49 pm #17600537 | |
|
jeanneK |
Here is the image of the Cart page I see |
| November 24, 2025 at 4:28 pm #17605693 | |
|
Ilyes Supporter
Languages: English (English ) French (Français ) Arabic (العربية ) Timezone: Pacific/Easter (GMT-05:00) |
Hello, Otto is on holiday today, so I will take care of your request in the meantime, regarding the email notifications, you should be able to change the notification settings from your account here : https://wpml.org/account/account-preferences/ Make sure the box "Send me an email when I receive a reply to a support question" is selected. For the license, is it possible to contact WooCommerce Product Options team for a testing license or assign your current license to hidden link temporarily, we can then debug this locally, |
| November 24, 2025 at 7:23 pm #17606077 | |
|
jeanneK |
Hello Ilyes, Re Re Re: Here is the license key But I do not know how to assign our current license to hidden link Please advise. With thanks, |
| November 24, 2025 at 8:10 pm #17606154 | |
|
jeanneK |
Please could you send me an email when you reply. |
| November 25, 2025 at 3:04 pm #17608689 | |
|
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello Jeanne, Thanks! I used the key you've provided in my local copy of your site, and now I managed to see the problem and debug it. The product options are translated on the product page because WooCommerce Product Options explicitly sends those strings through its WPML integration filter (wc_product_options_get_output_string, which calls wpml_translate_string). However, when an item is added to the cart, the plugin stores the raw (untranslated) option name and choice labels inside its own wpo_options cart meta, and later outputs them in the cart/checkout without passing them back through WPML. This limitation is in the integration on the WooCommerce Product Options side. As they took care of the integration, we need to reach them to fix it for good. Meanwhile, I found this workaround:
/**
* Translate WooCommerce Product Options texts when adding to cart
* using the plugin's own WPML integration.
*/
add_filter( 'woocommerce_add_cart_item_data', 'my_wpo_translate_cart_meta_with_wpml', 20, 4 );
function my_wpo_translate_cart_meta_with_wpml( $cart_item_data, $product_id, $variation_id, $quantity ) {
// If there are no WPO options in this cart item, do nothing.
if ( empty( $cart_item_data['wpo_options'] ) ) {
return $cart_item_data;
}
// Make sure the plugin classes exist (plugin is active and loaded).
if (
! class_exists( '\Barn2\Plugin\WC_Product_Options\Plugin_Factory' ) ||
! class_exists( '\Barn2\Plugin\WC_Product_Options\Integration\WPML' ) ||
! class_exists( '\Barn2\Plugin\WC_Product_Options\Model\Option' )
) {
return $cart_item_data;
}
// Get the plugin instance and the WPML integration helper.
$plugin = \Barn2\Plugin\WC_Product_Options\Plugin_Factory::create( '', '' );
$wpml_integration = new \Barn2\Plugin\WC_Product_Options\Integration\WPML( $plugin );
foreach ( $cart_item_data['wpo_options'] as $option_id => &$option_data ) {
// Load the option model so we can access the original data.
$option = \Barn2\Plugin\WC_Product_Options\Model\Option::find( $option_data['option_id'] ?? 0 );
if ( ! $option ) {
continue;
}
// 1) Translate the option name (the "key" shown in cart/checkout).
$translated_name = $wpml_integration->translate_string( $option->name, $option, 'option_name' );
$option_data['name'] = $translated_name;
// 2) Translate each choice label, if any.
if ( empty( $option_data['choice_data'] ) || empty( $option->choices ) ) {
continue;
}
// Build a map: choice_id => index, to reproduce the same index WPML uses.
$index_by_id = [];
foreach ( $option->choices as $idx => $choice ) {
if ( isset( $choice['id'] ) ) {
$index_by_id[ $choice['id'] ] = $idx;
}
}
// Normalize the stored value to an array (covers both single and multi).
$values = is_array( $option_data['value'] ) ? $option_data['value'] : [ $option_data['value'] ];
foreach ( $option_data['choice_data'] as $i => &$choice_data ) {
if ( ! isset( $choice_data['label'] ) ) {
continue;
}
// For free-text fields, there are usually no predefined choices to translate.
if ( empty( $index_by_id ) ) {
continue;
}
$value_for_this_choice = $values[ $i ] ?? null;
if ( ! isset( $index_by_id[ $value_for_this_choice ] ) ) {
continue;
}
$choice_index = $index_by_id[ $value_for_this_choice ];
$original_label = $option->choices[ $choice_index ]['label'];
// Translate the choice label using the same context and index as when registered.
$choice_data['label'] = $wpml_integration->translate_string(
$original_label,
$option,
'choice_label',
$choice_index
);
}
}
return $cart_item_data;
}
This workaround has the following limitation. If a customer changes language after already having products in the cart, the labels are not “re‑translated”: they remain in the language that was active when the product was added (just like other metadata that stores fixed text). But it's rare switching languages at that stage. If the client changes languages before start shopping and keeps it, it will be OK. As I mentioned, this is an “external” workaround; the definitive fix should come from Barn2 (which does not pass the cart/checkout texts through its WPML filters). Please, give it a try and once you confirm we will reach them too so they implement the final solution on their code. Best Regards, |


