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(wcs): update subscription expiration feature #3613

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

chickenn00dle
Copy link
Contributor

@chickenn00dle chickenn00dle commented Dec 9, 2024

All Submissions:

Changes proposed in this Pull Request:

This PR updates the subscriptions expiration feature by:

  1. Adding expired cancellation reason meta value
  2. Adding a filter to the is_enabled WCS integration method
  3. Updating the default on-hold duration to 30 days

How to test the changes in this Pull Request:

  1. Ensure the FF and newspack debugging is enabled in wp-config (FF: define( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION', true );)
  2. As a reader, either purchase a subscription or cancel subscriptions until you only have a single active subscription.
  3. As admin, set the subscription status to expired an save.
  4. Confirm the newspack_subscriptions_cancellation_reason Woo meta is present for the subscription on reload
    Screenshot 2024-12-09 at 12 50 10
  5. Check the logs for normalized esp data and confirm the expiration reason is present with a value of expired
    Screenshot 2024-12-09 at 12 46 41
  6. Somewhere on the site, add a hook to the newspack_subscriptions_expiration_enabled to force disable the feature.
  7. Repeat the above steps, but this time confirm no meta is added in both Woo and the ESP
  8. Make sure the newspack_subscriptions_on_hold_duration option is not set on your site
  9. Go to WooCommerce > Settings > Subscriptions and scroll to the bottom
  10. Confirm the on-hold duration is set to 30 days

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@chickenn00dle chickenn00dle requested a review from a team as a code owner December 9, 2024 17:53
@chickenn00dle chickenn00dle added the [Status] Needs Review The issue or pull request needs to be reviewed label Dec 9, 2024
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Dec 10, 2024
@chickenn00dle chickenn00dle merged commit ebf6e6d into trunk Dec 10, 2024
8 checks passed
@chickenn00dle chickenn00dle deleted the fix/update-subscription-expiration-feature branch December 10, 2024 14:41
Copy link

Hey @chickenn00dle, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

chickenn00dle added a commit that referenced this pull request Dec 12, 2024
This PR updates the subscriptions expiration feature by:
- Adding expired cancellation reason meta value
- Adding a filter to the is_enabled WCS integration method
- Updating the default on-hold duration to 30 days
matticbot pushed a commit that referenced this pull request Dec 12, 2024
# [5.10.0-alpha.1](v5.9.1...v5.10.0-alpha.1) (2024-12-12)

### Bug Fixes

* duplicate orders save on cron ([#3604](#3604)) ([ec69167](ec69167))
* **ras-acc:** re-add recaptcha to the WooCommerce checkout ([#3605](#3605)) ([f42a75b](f42a75b))
* **ras:** do not require Woo plugins if using NRH ([#3614](#3614)) ([363a834](363a834))
* **wcs:** remove subscriptions expiration feature flag ([#3618](#3618)) ([7c175d9](7c175d9))
* **wcs:** update subscription expiration feature ([#3613](#3613)) ([ebf6e6d](ebf6e6d))
* **wcs:** update subscriptions expiration cli behavior ([#3617](#3617)) ([07e768c](07e768c))

### Features

* **subscriptions:** add cancellation reason metadata ([#3568](#3568)) ([de83e02](de83e02))
* **wc:** duplicate orders admin notice ([#3555](#3555)) ([cb764e3](cb764e3))
* **wcs:** add expired subscription cli tool ([#3593](#3593)) ([5d39398](5d39398))
* **webhooks:** filter request priority ([#3587](#3587)) ([1928a6a](1928a6a))
* **woocommerce-subscriptions:** add url redirect for wc subscription renewals ([#3525](#3525)) ([5b14aeb](5b14aeb))

### Reverts

* Revert "feat: command to initialize cron job to slowly backfill CAP term data (#3425)" (#3620) ([c9a9d45](c9a9d45)), closes [#3425](#3425) [#3620](#3620)
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.10.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @alpha [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants