-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix amounts when manually renewing a subscription #10156
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.36 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good and works as expected. I’m leaving a small comment, but it doesn’t require any major changes.
Great fix, @cesarcosta99!
Fixes #6739.
Changes proposed in this Pull Request
This PR tweaks the
should_convert_product_price
logic in the WooCommerce Subscriptions multi-currency compatibility. The implementation of the method is changed in a way to separate the subscription renewal logic from the resubscribe logic since they can behave differently.This fixes the "mini-cart" unconverted amount issue reported in #6739 and makes sure the amount is converted as needed in other places. "Mini-cart" is within quotes because the issue is not in the mini-cart, actually it's in the subtotal value that was not being converted on time for display.
Testing instructions
Setup
Important
During testing, pay close attention to amounts all of the time. This way we can ensure a consistent conversion and behavior of all multi-currency and subscriptions interactions.
Test: Ensure all amounts are displayed correctly when doing an early renewal
Regression test: Ensure purchasing a simple subscription works as expected
Regression test: Ensure automatic subscription renewal works as expected
woocommerce_scheduled_subscription_payment
item with the customer subscription ID.Regression test: Ensure merchant manual subscription renewal works as expected
Regression test: Ensure resubscribe works as expected
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