Skip to content
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 renewing recurring subscription with PPE #2972

Merged

Conversation

dparker1005
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Letting the checkout preheader save the MemberOrder during a successful recurring PPE checkout instead of saving sooner.

When an order is saved in "success" status, a PMPro Subscription is created for the user if needed. By saving the order early, the PMPro sub was created early. Then, when the user's level is changed and all of their active subs are deleted, this new subscription is deleted too.

With the fix, the order isn't saved until after the level change occurs. So now, any previous subscriptions are deleted on level change, and the new subscription is set up in PMPro afterwards.

Resolves XXX.

How to test the changes in this Pull Request:

  1. Log in as a user with a membership level
  2. Purchase that same membership level again with a recurring membership via PPE
  3. See that before the fix, the new subscription was immediately cancelled. After the fix, the subscription remains as expected

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

Copy link
Contributor

@andrewlimaza andrewlimaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix resolves the issue, thanks for catching this.

@dparker1005 dparker1005 merged commit 5eb6617 into strangerstudios:dev May 8, 2024
@dparker1005 dparker1005 deleted the ppe-let-checkout-preheader-save branch May 8, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants