Add Sunshine Photo Cart integration#70
Closed
derekashauer wants to merge 2 commits into
Closed
Conversation
This adds integration support for Sunshine Photo Cart, a photo gallery and e-commerce plugin for professional photographers. Features: - Login form protection - Registration form protection - Lost password form protection - Checkout form protection (with guest-only option) Technical details: - Handles AJAX-loaded modal forms by pre-loading Turnstile API and using explicit rendering with turnstile.render() - Uses is_sunshine() to only load scripts on Sunshine pages - Tracks rendered widgets to prevent duplicates from multiple event handlers - Listens for Sunshine custom jQuery events (require_login, login, signup) - Clears widget tracking when modal closes for clean re-renders Co-Authored-By: Claude Opus 4.5 <[email protected]>
740bad8 to
1b2e947
Compare
…ion is also enabled Skip the global WordPress authenticate and registration_errors Turnstile checks when the request originates from a Sunshine Photo Cart form. Turnstile tokens are single-use, so the Sunshine-level validation consumes the token before the WordPress-level check runs, causing false failures. Uses the existing cfturnstile_wp_login_checks and cfturnstile_wp_register_checks filters, matching the pattern used by WooCommerce and EDD integrations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implementation Details
turnstile.render()callsturnstile.reset()is called after form submissions for retry attemptsrequire_login,login,signup,sunshine_reload_checkout,sunshine_checkout_payment_change)Test plan
Requires Sunshine Photo Cart 3.6