Skip to content

Conversation

@n7studios
Copy link
Contributor

Summary

Building on #953, this PR:

  • replaces all admin-ajax.php based gated content authentication with dedicated WP REST API endpoints,
  • adds /kit/v1/restrict-content/subscriber-authentication and /kit/v1/restrict-content/subscriber-verification WP REST API endpoints,
  • refactors core logic into the new reusable methods run_subscriber_authentication() and run_subscriber_verification(), which can be used by the REST API or the existing maybe_run_* methods for non-API/non-JS requests.

Testing

  • RESTAPITest: Added tests for /wp-json/kit/v1/restrict-content/subscriber-authentication and /wp-json/kit/v1/restrict-content/subscriber-verification

Checklist

@n7studios n7studios self-assigned this Nov 18, 2025
@github-actions
Copy link

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios requested review from a team, corydhmiller and noelherrick and removed request for a team November 19, 2025 07:54
@n7studios n7studios marked this pull request as ready for review November 19, 2025 07:54
@n7studios n7studios merged commit 3112412 into main Nov 20, 2025
149 of 153 checks passed
@github-actions
Copy link

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios deleted the replace-admin-ajax-with-rest-api-restrict-content branch December 5, 2025 06:53
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.

3 participants