Skip to content Skip to sidebar

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 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:
I am trying to launch a new product on my WooCommerce site. I need to select the Greek language page, select the product, and go to the Cart to see the issues.

Symptoms:
The client did not specify the exact issue or error message encountered when trying to view the product in the Cart.

Questions:
What issues are occurring when selecting the Greek language page and viewing the product in the Cart?jeanneK : Go to
hidden link
Select Greek language flag
On this page Select the three tiles - one above other
Enter messages
Order
Go to Cart
See there what is still appearing in English
2 things
Product options - specific to customer
and
'Estimated Total' standard on template
Product Options (specific to Customer0 and Estimated Total (specific to template) not being translated

November 20, 2025 at 10:40 am #17594914

jeanneK

Two issues
not being translated

: Go to
hidden link
Select Greek language flag
On this page Select the three tiles - one above other
Enter messages
Order
Go to Cart
See there what is still appearing in English
2 things
Product options - specific to customer
and
\'Estimated Total\' standard on template

Product Options (specific to Customer0
and E
stimated Total (specific to template) not being translated

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.
It would be better to a testing site where the issue is replicated.

The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I'll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site.
This will allow me to create a copy of your site and your content.
Once the problem is resolved I will delete the local site.

**IMPORTANT**
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields.

Best Regards,
Otto

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,
Jeanne

November 21, 2025 at 7:50 am #17597581

jeanneK

And can you send me an email when you reply.

ioanna @gardensofdiscovery.org
or the registerd email address

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,
Jeanne

November 21, 2025 at 4:13 pm #17599853

jeanneK

I have not yet seen Otto's reply from about 3 hours ago.
The email I received states:
Hi Jeanne,

I replied in the ticket:
https://wpml.org/forums/topic/woocommerce-product-options-and-cart/

Best Regards,
Otto
WPML Support Team
OnTheGoSystems
http://www.onthegosystems.com
The makers of WPML, Toolset and ICanLocalize

But I do not know where to access thatfor the link brings me here, and there is no reply here.
I have backed up and provided Otto with Admin access using the email address in the email I recived from him.

Please advise,
With thanks,
Jeanne

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,
Otto

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:
https://wpml.org/errata/woocommerce-multilingual-cart-page-strings-not-translated-when-using-blocks/

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:
hidden link

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:
❌ Please make a full website backup before proceeding ❌
- Go to pages, Cart and edit the translation (check the screenshot attached)
- Complete all the segments (100%) and save it
- Check if the issue persists
- Don't ignore the backup warning, please 🙂

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,
Otto

CleanShot 2025-11-21 at 16.11.51.png
CleanShot 2025-11-21 at 16.11.39.png
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
See this link - apparently keeping you logged in is a wordpress matter :
hidden link

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,
Jeanne
p.s. I am still not being automatically notified by email when you reply - I only see when I login.

November 21, 2025 at 7:49 pm #17600537

jeanneK

Here is the image of the Cart page I see

Screenshot 2025-11-21 at 21.46.34.png
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
the email notifications,
"Send me an email when I receive a reply to a support question" box - is already selected.
and the email address is valid - but no notifications are being received when this support log is updated!

Re
For the license,
I contacted Barn2 product options today and requested a developer key, but they have yet to reply.

Re:
product options

Here is the license key
a90ef4fddc769a06965363baae83ed4d

But I do not know how to assign our current license to hidden link

Please advise.

With thanks,
Jeanne

November 24, 2025 at 8:10 pm #17606154

jeanneK

Please could you send me an email when you reply.
With thanks,
Jeanne

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:
❌ Please make a full website backup before proceeding ❌
In your theme's functions.php file, paste the following code:

/**
 * 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,
Otto