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

Last updated by Shekhar Bhandari 1 month, 3 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
August 8, 2019 at 1:57 pm

peter

Hello,

I have an issue with the currency switcher. I have it set to 1 SEK = 0.09 EUR (see image). But in the frontend it calculates wrong.

For example a product that cost 245 SEK becomes €1.98

But 245*0,09 equals 22,05

I have tested with all plugins disabled except Woocommerce and WPML plugins, still same problem.

Thanks,
Daniel

August 9, 2019 at 5:17 am #4367431

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

We recently released new versions of WPML plugins with fixes and improvements so could you please update the plugin to the latest version and let me know if this helps?

NOTE:

+ Make a backup (both files and database) for your site before updating/proceeding anything (Always a good practice!). You can use a plugin for this if you like. I often use the Duplicator plugin for this purpose. See: http://wordpress.org/plugins/duplicator/

Look forward to your reply.

Thanks

August 9, 2019 at 8:23 am #4368669

peter

Hello,

I updated the all WPML plugins and still the same issue.

August 9, 2019 at 9:23 am #4368959

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

This seems unusual, Could you please provide feedback on the following questions as much as possible?

#1
Can you confirm that you are still experiencing issues with minimal set up (all plugins except WPML disabled and the theme on a WordPress default such as Twenty Nineteen)

#3
1. Please follow the debugging information provided here: http://wpml.org/documentation/support/debugging-wpml/
2. Repeat the action of creating the problem.
3. Copy and paste the contents of debug.log (log file inside the /wp-content/ directory) here for me to see.

Thank you for helping us to pinpoint the issue. Feel free to add any further information you may have.

Look forward to your reply.

Thanks

August 9, 2019 at 2:03 pm
August 12, 2019 at 12:06 pm #4380521

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for the debug.log

Could you also share the results of the #1?

Look forward to your reply.

Thanks

August 13, 2019 at 8:32 am #4385865

peter

Hello,

I have tested with everything disabled and default WordPress theme etc. I even copied the site so I could test all sorts of things. You can find it here hidden link

You can use same login as in the first message, and on this site you can do whatever, break stuff if u have to 🙂

August 13, 2019 at 8:39 am #4385921

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The login details provided in the first reply isn't working, can you check it again?

Thanks

August 13, 2019 at 11:47 pm #4391149

peter

Hello,

It should work here now hidden link

August 14, 2019 at 4:20 am #4392247

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

It's still not working, can you check it yourself once or create new login details.

I have enabled the private reply for you.

Thanks

August 14, 2019 at 8:15 am
August 14, 2019 at 11:51 am #4394611

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am trying to replicate the issue on your test site, I noticed that when the conversation rate is greater then 1 the issue doesn't seem to be existing, can you check this once?

Also, can you please share me how you have configured your VAT and shipping settings with an example.

Look forward to your reply.

Thanks

August 19, 2019 at 8:25 am #4414507

peter

Hello,

Im getting the same issue even if 1 SEK = 2 EUR then a product costing 1 SEK becomes 4 EUR (it does the calculation twice).

You can view the tax and shipping settings on the testsite, and here is a screenshot of the tax settings

August 19, 2019 at 11:40 am #4415605

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I tested this issue on my test server and couldn't replicate the issue, so to debug this issue quickly, it will be best to test the issue on a fresh new Installation, being so I would need your little help to pinpoint the issue further.

I have created a fresh new WordPress Installed test site here, hidden link you can click on the link to login.

Could you please use the same settings there and see if you can replicate the issue? Please don't use personal information on the site as it's a test site, I recommend using some dummy data.

This will help us to debug this issue further.

Look forward to your reply.

Thanks

August 19, 2019 at 3:01 pm #4417023

peter

Hello,

I actually found what was the error, I didnt test with a basic theme I noticed I just disabled all plugins (my bad..).

And in the child theme the following is what gives the wrong calculations:

add_filter( 'woocommerce_available_payment_gateways', 'hide_gateways' );
 
function hide_gateways( $gateways ) {
	global $woocommerce_wpml;

	$get_current_currency_wcml = new WCML_Multi_Currency();
	$get_current_currency = $get_current_currency_wcml->get_client_currency();

	if( $get_current_currency == 'EUR' ){
		unset( $gateways['cod'] ); 
	} 
	return $gateways;
}

The topic ‘[Closed] Currency switcher calculations’ is closed to new replies.