This repository was archived by the owner on May 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Fix status update for wrong renewal orders #625
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
james-allan
reviewed
May 24, 2024
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.
Hey @wjrosa. Nice PR.
The changes test well. I confirmed that processing a renewal order which isn't the latest order also causes the latest renewal order to be set to processing.
I left some inline feedback about missing function block descriptions and a suggestion about changing the wcs_get_newest_renewal_orders()
to be more general use.
Co-authored-by: James Allan <[email protected]>
…e comprehensive version
james-allan
suggested changes
May 27, 2024
Co-authored-by: James Allan <[email protected]>
Co-authored-by: James Allan <[email protected]>
james-allan
approved these changes
Jun 13, 2024
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.
Changes look good @wjrosa. I've just left two tiny comments. Approving as they aren't blocking. :)
Co-authored-by: James Allan <[email protected]>
Co-authored-by: James Allan <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 4503-gh-woocommerce/woocommerce-subscriptions
Description
Currently, if there are multiple renewal orders with the pending payment status, and you set one of them to completed, then one of the other renewal orders is changed to the processing status. This PR fixes that by checking if the order being handled is the last renewal order from the subscription. It also introduces some new helper functions for subscriptions.
How to test this PR
pending payment
status for the same subscription.pending payment
renewal orders tocompleted
(not the last one)trunk
, notice that another one of thepending payment
renewal orders has been changed toprocessing
Product impact