Skip to content

1.5.0

Latest

Choose a tag to compare

@charlesfontanos charlesfontanos released this 14 May 00:00
· 4 commits to master since this release
Bypass WP REST cookie/nonce for leads

Short-circuit WP's REST cookie/nonce auth for this plugin's mct/leads routes by adding a rest_authentication_errors filter at priority 5 and implementing bypass_rest_cookie_auth_for_plugin_routes(). The new method detects both pretty (/wp-json/{ns}/leads...) and query (?rest_route=/{ns}/leads...) REST URIs and returns true to skip core's rest_cookie_check_errors, preventing cached nonces from causing 403s while preserving server-side validation and API token protection. Also bump plugin version to 1.5.0 (MCT_VERSION and header).