Skip to content Skip to sidebar

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

Problem:

An issue with the WooCommerce Bookings plugin - Currency issue - price is not changing according to the country on the checkout page.

Solution:

Our compatibility developer has shared a workaround for this issue.

1. Take a backup of your site in case something goes wrong.

2. Edit the following file with a code editor.
/wp-content/plugins/woocommerce-bookings/includes/class-wc-booking-cart-manager.php

3. Find this line (should be line 21).

add_filter( 'woocommerce_get_cart_item_from_session', array( $this, 'get_cart_item_from_session' ), 10, 3 );

4. Comment it out like this:

//  add_filter( 'woocommerce_get_cart_item_from_session', array( $this, 'get_cart_item_from_session' ), 10, 3 );

5. Save the changes in the file.

Now, the problem should be solved, and while on the checkout page, when you switch to a country other than Sweden, the currency will change.
Please be aware that the suggested workaround might have other effects we are unaware of.

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 contains 21 replies, has 2 voices.

Last updated by Itamar 1 year, 10 months ago.

Assisted by: Itamar.

Author Posts
November 12, 2023 at 9:44 am #14783393

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I want to update you that this issue has been escalated to our developers.
We will keep updating you here.

I appreciate your patience.
Itamar.

November 16, 2023 at 8:16 am #14822613

annaW-22

Thank you ! Though this is a critical issue and a business stopper. Can you make sure it is prioritized? Thanks.

November 16, 2023 at 4:01 pm #14828651

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I've just sent a reminder about it to our second-tier supporters. I'll keep you updated.

We now have new versions for WPML - 4.6.7 and WooCommerce Multilingual & Multicurrency 5.3.0.

Can you please update our plugins to their latest version and see if, by any chance, it helps to solve the issue of this ticket?

https://wpml.org/faq/install-wpml/#checking-for-updates

Thanks,
Itamar.

November 21, 2023 at 8:21 am #14882897

annaW-22

No this update did not resolve the issue. Please prioritise this! /Kristina

November 22, 2023 at 9:43 am #14894789

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for trying this.

I am waiting for a reply from our developer if there is a fix we can offer you for this issue. I'll update you once I have his answer.

November 22, 2023 at 4:02 pm #14900565

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Our compatibility developer has shared a workaround for this issue.

1. Take a backup of your site in case something goes wrong.

2. Edit the following file with a code editor.
/wp-content/plugins/woocommerce-bookings/includes/class-wc-booking-cart-manager.php

3. Find this line (should be line 21).

	add_filter( 'woocommerce_get_cart_item_from_session', array( $this, 'get_cart_item_from_session' ), 10, 3 );

4. Comment it out like this:

	//	add_filter( 'woocommerce_get_cart_item_from_session', array( $this, 'get_cart_item_from_session' ), 10, 3 );

5. Save the changes in the file.

Now, the problem should be solved, and while on the checkout page, when you switch to a country other than Sweden, the currency will change.

Regards,
Itamar.

November 22, 2023 at 4:05 pm #14900575

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Please be aware that the suggested workaround might have other effects we are unaware of.

November 26, 2023 at 10:02 am #14924233

annaW-22

It seems like it works now. Thank you.