Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

Currency switch - 1.4.0 - bug #427

Closed
fkoomek opened this issue Jun 8, 2019 · 4 comments
Closed

Currency switch - 1.4.0 - bug #427

fkoomek opened this issue Jun 8, 2019 · 4 comments

Comments

@fkoomek
Copy link

fkoomek commented Jun 8, 2019

Can you reproduce this issue on default Wordpress theme (eg Storefront)?

Yes

Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang, and Hyyan WooCommerce Polylang Integration?

Yes

What product versions and settings are you using when this issue occurs?

  • PHP: 7.3.6
  • WordPress: 5.2.1
  • WooCommerce: 3.6.4
  • Polylang: Free
  • Hyyan WooCommerce Polylang Integration: 1.4.0
  • Browser: any

Steps to Reproduce

  1. Set up Polylang with at least 2 languages.
  2. Create a product in both languages.
  3. Install any Woocommerce currency switcher (I used Currency Switcher by Realmag and switcher by algoritmika)
  4. Set 2 currencies.
  5. Go to the shop and switch to the additional currency (not the default one).
  6. Add the product to the cart.
  7. Go to the Cart page.
  8. Switch to the second language.

What I Expected

The product prices are correct.

What Happened Instead

The prices of products in the cart are not correct.
Although, the subtotal in the Shipping calculator is correct.

This is a bug introduced in pre-release 1.4.0. I tested it now for a few hours.
image

Also, possible to test here (EURO is the additional currency):
https://www.test2.liberlapidum.com/test2/

@fkoomek fkoomek changed the title Currency switch - 1.4.0 Currency switch - 1.4.0 - bug Jun 8, 2019
@Jon007
Copy link
Contributor

Jon007 commented Jun 9, 2019

Hmm yes there is a thing added for compatibility with other plugins which manipulate the price - fixes #390, #346 Cart: retain price when switching languages - you can remove the code added in this commit:
ec272c0

Or change the priority of the filters....
I will take a look...

@Jon007
Copy link
Contributor

Jon007 commented Jun 9, 2019

@Jon007
Copy link
Contributor

Jon007 commented Jun 9, 2019

ok so realmag with the modification, the code is copying the converted price across when changing languages, then the currency switcher is converting it again because it does not know the cart price is already converted.

@fkoomek
Copy link
Author

fkoomek commented Jun 9, 2019

Great! Thanks for the fix :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants