PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

The price and currency is changing to default after redirecting to PayPal

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

As I've already posted here, we have an issue with changing the price and currency based on GeoIP rules. The price is correct on the Product Page, then on the Cart and Checkout pages also. Unfortunately, when a user selects the PayPal payment option and gets redirected to the PayPal payment page the price and the currency are not correct. They gets changed back to the default values as if there weren't any GeoIP rules. Basically what happens is:

We have a test product that has prices set like this: for Poland – 199 EUR (default price and currency), for the UK – 119 GBP (custom GeoIP rule).

Now:

1. A user is from the UK and enters the test product page
2. The price shows 119 GBP (as it should)
3. The user hits “Buy now” and gets redirected to the checkout page (the price and currency is correct)
4. The user selects the “PayPal” option for payment and gets redirected to the PayPal payment page
5. The price on the PayPal payment page is showing now 199 EUR (wrong)

The price gets changed unexpectedly to the default value which causes our clients to abandon the product and not buy it (they see it as a scam).

Our env:
WP: Version 5.3.2
WOOCS: Version 2.2.3

As an additional note, I can tell that we also use W3TC plugin for caching and we have enabled the “I am using cache plugin on my site” option in the plugin settings. And it seems to work because on the product page/cart/checkout the currencies and prices are correctly changed via AJAX. The problem is that during payment it gets changed back to default values. Do you have any idea what could be a problem? Do you need any additional info about our server setup?

How can we debug this?

Hello

Very strange! Because this plugin controls the price only up to the checkout page, then the payment system controls the currency.

Please  paste your  wp-admin access I will  check  it - https://c2n.me/43SC6rb.png ->https://c2n.me/42BAoj4.png

Hello,

Thanks for the response, I have added the temporary login to the private data.

Hello

Did  you  customize  plugin?  I see an old version of the plugin(interface), but the number is like the new version of the plugin - https://c2n.me/46mZtND.png

Please do the correct plugin update!  and  do test

Hi,

Thanks for the investigation.

That's weird indeed. We haven't customized the plugin's code in any way. We are updating it regularly as the info appears in the Admin area. Maybe we are doing something wrong.. where can we download the latest version of the plugin from?

Hello

Read  this please - https://currency-switcher.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato/

but  in  your  case:  Delete  the  old version of the  plugin(by FTP or on  plugins page )  and  download+install  new  version from envato( https://codecanyon.net/downloads  )  All  settings  will  be saved

 

Thanks for the instructions.

I'll try to do as they say and will get back to you with the result ;)

Hello

Ok!

Hi there,

So we have upgraded the plugin according to the instructions but the problem still persists. You can verify this by entering our website and going to the product page (any product). My scenario looks like this:

  1. Enter the product page using VPN (the USA has configured custom currency - USD) so the currency would change for me from EUR to USD
  2. In the Chrome Devtools -> Network tab you can see that the request is being performed and it returns something like this:
    { current_currency:"USD", ids: {...} }
  3. The currency is still EUR (although the request returned current_currency as USD
  4. Add the product to the Cart - the currency changes to USD
  5. Proceed to Checkout - the currency is USD
  6. Select the PayPal payment method and hit the"Place Order" button
  7. The currency changes back to EUR

As I previously stated, we are using the W3TC plugin for caching on our site. We have checked the"I am using cache plugin on my site" option in the Settings panel but apparently it doesn't work as expected (the currency remains EUR although the request returns USD).

Do you have any idea how can we debug this further?

Hello

Please check  your  wp-admin access.

Drop me  a link to the  page with this  issue.

Hello,

I've updated private data for this topic.

The link to the page is for example this one: https://mdbootstrap.com/products/jquery-ui-kit/

Hello

I disabled  this  option  - https://c2n.me/46UxWVp.png - everything works correctly - https://c2n.me/46Uy5Nv.png

Hello,

Does the currency display correctly on the product page? (https://mdbootstrap.com/products/jquery-ui-kit/)

When I connect from USA (Vancouver) via VPN I still see EUR as the currency although in the dev console I can see that the current_currency is set to USD. On the Cart and Checkout pages, the currency is correct. On the product page (link above) the currency is incorrect. Does it occur when you visit the page?

Hello

Does it occur when you visit the page?  - Yes! Real prices work correctly - https://c2n.me/46WBdN6

Please  update  plugin  to  latest  version - https://currency-switcher.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato/

Hello,

That's embarrassing ;)

Thanks for your help, it looks that we have messed something up in the WooCommerce templates. We'll check that and I'll come back to you with the result.

Hello

Very important! - update the plugin to the latest version. The new version has some fixes for cached pages

Hello again,

So I have fixed the issue on our side. For some reason, the currency wouldn't change until a change event was triggered on the #license_dropdown element. So I have started digging and discovered that the after_woocs_get_products_price_html event is dispatched after the data-variations attribute is set (in the front.js file). So I've set a listener on that event and just run .trigger('change') on the mentioned element and it seems to work.

Thanks for your time and help!

Hello

Greate!  Welcome;)