fix(stripe): skip card validation for free trials - #1676
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughStripe checkout now centralizes payment-collection decisions, conditionally confirms new or saved payment methods, resets Payment Element state, and unblocks submission when payment collection is disabled. ChangesStripe payment flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CheckoutForm
participant StripeGateway
participant StripeAPI
CheckoutForm->>StripeGateway: submit checkout form
StripeGateway->>StripeGateway: evaluate shouldCollectStripePayment
alt collect new payment details
StripeGateway->>StripeAPI: confirmStripeIntent with elements
else use saved payment method
StripeGateway->>StripeAPI: confirmStripeIntent without elements
else no Stripe collection
StripeGateway->>StripeGateway: resetStripeElements and unblock submission
end
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@assets/js/gateways/stripe.js`:
- Around line 177-179: Use shouldCollectStripePayment() consistently in the
Stripe form-update and success handlers instead of checking only
form.order.should_collect_payment. In the saved-method case, route confirmation
through its dedicated flow; when the shared predicate is false, clear submission
prevention and call resetStripeElements().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8e170abc-4a3f-436e-9769-9c698102c64c
📒 Files selected for processing (1)
assets/js/gateways/stripe.js
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
Verification
Notes
The PR build workflow runs npm run build, so the customer nightly.link ZIP generated from this PR should include regenerated minified assets for this Stripe JS change.
aidevops.sh v3.32.188 plugin for OpenCode v1.18.5 with gpt-5.5
Summary by CodeRabbit