Skip to content

Conversation

@miguelpeixe
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Filters applied to the_content may restore the original content to a restricted post. This ensures the restricted content persists.

How to test the changes in this Pull Request:

  1. Without Woo Memberships, configure a content gate (Audience -> Content Gates) with inline layout
  2. While in trunk, visit a restricted post and confirm the gate never renders, and the original post is displayed
  3. Checkout this branch, run wp cache flush, and refresh the page
  4. Confirm the content is restricted, and the gate now renders in the expected position
  5. Change the gate layout to overlay and confirm it renders as expected and the content is also restricted

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?

@miguelpeixe miguelpeixe requested a review from a team as a code owner January 23, 2026 20:47
@miguelpeixe miguelpeixe self-assigned this Jan 23, 2026
@miguelpeixe miguelpeixe added the [Status] Needs Review The issue or pull request needs to be reviewed label Jan 23, 2026
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite working for me. Caching the content does seem to work well, but it also causes inline gate layout post content to get rendered without content filtering, meaning the raw block markup is rendered instead of the transformed HTML.

Separately, not due to anything in this PR, if both Registration and Paid Access layouts are enabled, visiting a restricted post will cause the Paid Access layout to always appear and never the Registration layout. This might be intentional, but I'm not sure it should be the case.

#4421 proposes some fixes which may address both of these issues, but let me know if it warrants further discussion.

@github-actions github-actions bot added the [Status] Needs Changes or Feedback The issue or pull request needs action from the original creator label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Changes or Feedback The issue or pull request needs action from the original creator [Status] Needs Review The issue or pull request needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants