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 subscriptions being immediately cancelled #3107

Conversation

dparker1005
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

For core gateways, if the user has a membership level and purchases it again with a subscription, the new subscription will be immediately canceled. This is happening because:

  1. The order was being saved in success status before the level changed occurred
  2. This caused the PMPro_Subscription entry to be added before level change
  3. During level change, all existing subscriptions for cancelled levels are deleted

The fix: Delay the saving of the success order (and therefore the creation of the PMPro Subscription) until after the level change and subs cancellations have been completed.

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.

@dparker1005 dparker1005 merged commit 03cf2d0 into strangerstudios:dev Aug 6, 2024
@dparker1005 dparker1005 deleted the fix-sub-creation-for-recurring-orders branch August 6, 2024 17:22
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.

1 participant