Member Content: Tags: Use Signed Subscriber ID #763
Merged
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.
Summary
The
wordpress/profile
API endpoint now returns a subscriber's tags, which allows the Kit Plugin to support checking if a signed subscriber ID has access to a tag, In cases where subscribers access member content gated by a product (via the Kit Plugin, signed subscriber ID only) and then switch to content gated by a tag.This also reduces an additional API request when a signed subscriber ID is stored in the cookie
Testing
testRestrictContentByTagUsingSignedSubscriberID
: Test that a subscriber has access to content when gated by tag using a signed subscriber ID.testRestrictedContentByTagOnFrontendUsingSignedSubscriberID
helper method to assert a signed subscriber ID that is subscribed to a tag is granted access to the content, and a signed subscriber ID that is not subscribed to a tag is not granted access to the contenttestRestrictedContentByTagOnFrontend
helper method to assert a subscriber ID that is not subscribed to a tag is not granted access to the content.Checklist