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

Member Content: Tags: Use Signed Subscriber ID #763

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

n7studios
Copy link
Contributor

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.
  • Added 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 content
  • Updated testRestrictedContentByTagOnFrontend helper method to assert a subscriber ID that is not subscribed to a tag is not granted access to the content.

Checklist

@n7studios n7studios self-assigned this Jan 21, 2025
@n7studios n7studios requested review from a team, noelherrick and corydhmiller and removed request for a team January 22, 2025 02:23
@n7studios n7studios marked this pull request as ready for review January 22, 2025 02:23
@n7studios n7studios merged commit b80ce66 into main Jan 23, 2025
77 checks passed
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.

2 participants