feat: new option to require all membership plans for restricted content#2623
Merged
Conversation
matticbot
pushed a commit
that referenced
this pull request
Sep 6, 2023
# [2.6.0-alpha.1](v2.5.1...v2.6.0-alpha.1) (2023-09-06) ### Features * add anonymized email to ga4 events ([#2585](#2585)) ([9ac1c33](9ac1c33)) * add filter to the lists in the reg block ([#2611](#2611)) ([d960541](d960541)) * new option to require all membership plans for restricted content ([#2623](#2623)) ([60b361e](60b361e))
Contributor
|
🎉 This PR is included in version 2.6.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
matticbot
pushed a commit
that referenced
this pull request
Sep 13, 2023
# [2.6.0](v2.5.1...v2.6.0) (2023-09-13) ### Bug Fixes * sync scripts for Stripe-to-Woo migrations ([#2632](#2632)) ([34beb15](34beb15)) ### Features * add anonymized email to ga4 events ([#2585](#2585)) ([9ac1c33](9ac1c33)) * add filter to the lists in the reg block ([#2611](#2611)) ([d960541](d960541)) * new option to require all membership plans for restricted content ([#2623](#2623)) ([60b361e](60b361e))
Contributor
|
🎉 This PR is included in version 2.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
6 tasks
6 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
All Submissions:
Changes proposed in this Pull Request:
Some publishers want to gate most articles behind a metered reg wall, but gate some smaller subset of those articles (e.g. those with a "Premium" category) behind a hard paywall. Free registrants should get access to most articles, but not to paywalled articles until they purchase the necessary membership. This is a common content gating strategy used by many large-scale publishing sites but which we currently can't support without the proposed change.
We do have the ability to show different paywalls for these two "tiers" of restricted content. This is done by creating two membership plans: Plan 1 restricts all posts with a metered reg wall. Plan 2 restricts Premium articles with a paywall.
However, the way WooCommerce Memberships works, if multiple different membership plans have different rules restricting the same content (as in the above example—Premium articles are a subset of all articles) it will grant access to the restricted content as long as the reader is a member of ANY applicable membership plan. So this defeats the purpose of the paywall in the above scenario: as soon as you register a free account, you get access to all articles, which includes the Premium articles.
This PR introduces a new option in the Reader Activation wizard where we already show other Content Gate settings. This option lets us implement a "stricter" evaluation of membership rules when deciding whether or not to grant access to restricted content.
The default (disabled) behavior introduces no changes to the current behavior, as some publishers have content gating strategies that require this behavior. When enabled, the behavior changes such that if multiple membership plans are restricting access to the same content, a reader must be a member of ALL plans in order to get access to the content, not just one of them.
Closes
1200550061930446/1205368936341187.How to test the changes in this Pull Request:
master, set up two membership plans.2.Other information: