Multicurrency: Do not modify deposit percentage for display. #7247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: WooCommerce Deposits #\506
Supersedes PR #6930
Changes proposed in this Pull Request
As reported in WooCommerce Deposits #\506, enabling multi-currency modifies the display of percentage deposits.
The issue comes from
WooCommerceDeposits::modify_cart_item_deposit_amount_meta()
attempting to convert a percentage number although it were currency.A store with a USD base selling a product with a 20% deposit results in the following displaying for select currencies:
AUD: 31%
CAD: 27%
INR: 1656%
I haven't written any tests as there are existing tests for multicurrency that are passing but as the plugin is using mocks the tests are passing as they're failing to account for the various filters running in this and deposits.
This is a sibling PR for https://github.com/woocommerce/woocommerce-deposits/pull/544
Product page
Cart page
Checkout page
Account > Order page
Testing instructions
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge