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

Improved approach to comment metering fix #3067

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

claudiulodro
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Note: This is a hotfix

A different approach than #3057 for the same issue. This should have much smaller potential side effects than modifying the global $wp_query object.

How to test the changes in this Pull Request:

Basically the same testing instructions as #3057

  1. Add a membership plan and set it to restrict all posts. Set up a metered wall that gives anonymous readers 1 pageview and registered readers 1 pageview. Make one or more comments on a post.
  2. Before applying this patch, visit the post as an anonymous reader and/or free registered user. Observe no comments are shown on the post.
  3. Apply this patch.
  4. Visit the post as an anonymous reader and confirm comments are shown. Visit a different post as an anonymous reader and confirm you're stopped by the wall.
  5. Visit the post as a free registered reader and confirm comments are shown. Visit a different post as a free registered reader and confirm you're stopped by the wall.
  6. Visit multiple posts as a paid reader and confirm you have access to all articles.

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?

@claudiulodro claudiulodro added the [Status] Needs Review The issue or pull request needs to be reviewed label Apr 15, 2024
@claudiulodro claudiulodro requested a review from a team as a code owner April 15, 2024 19:33
@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 Apr 15, 2024
@claudiulodro
Copy link
Contributor Author

Thanks for the speedy review! I've tested on staging and client sites, and this approach seems stable, so I'm going to merge.

@claudiulodro claudiulodro merged commit e73657d into release Apr 15, 2024
8 checks passed
@claudiulodro claudiulodro deleted the fix/member-comments-2 branch April 15, 2024 21:54
matticbot pushed a commit that referenced this pull request Apr 15, 2024
## [3.6.10](v3.6.9...v3.6.10) (2024-04-15)

### Bug Fixes

* safer approach to comment metering fix ([#3067](#3067)) ([e73657d](e73657d))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.6.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Apr 18, 2024
# [3.7.0-alpha.4](v3.7.0-alpha.3...v3.7.0-alpha.4) (2024-04-18)

### Bug Fixes

* safer approach to comment metering fix ([#3067](#3067)) ([e73657d](e73657d))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.7.0-alpha.4 🎉

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 released [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