-
Notifications
You must be signed in to change notification settings - Fork 49
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: hourly cron job to check for prematurely expired memberships #3060
Conversation
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.
Looks solid. I think we may run into scalability issues if it's processing thousands of subscriptions, but since it's cron it won't really affect the site functionality and there are a few different ways we can adjust it to compensate. I'd like to see if it does run into issues first though :)
## [3.6.8](v3.6.7...v3.6.8) (2024-04-11) ### Bug Fixes * hourly cron job to check for prematurely expired memberships ([#3060](#3060)) ([77eeee3](77eeee3))
🎉 This PR is included in version 3.6.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [3.7.0-alpha.2](v3.7.0-alpha.1...v3.7.0-alpha.2) (2024-04-11) ### Bug Fixes * hourly cron job to check for prematurely expired memberships ([#3060](#3060)) ([77eeee3](77eeee3))
🎉 This PR is included in version 3.7.0-alpha.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Addresses the same issue as in #3050, but with a more performant approach.
Rather than filtering data at the moment any membership/subscription is fetched, this implements an hour cron job that iterates through all active subscriptions on the site, checks any memberships associated with those subscriptions, and reactivates memberships that aren't in an active state. This should ensure that anyone with an active subscription should have access to the memberships their subscription(s) grant them.
How to test the changes in this Pull Request:
Follow the same testing instructions as in #3050, but also note that if you have
define( 'NEWSPACK_LOG_LEVEL', 2 );
defined in wp-config.php, you'll see some additional logging showing that the cron job is working:Other information: