FIX: When order becomes free through coupon, avoid payment method load#15
FIX: When order becomes free through coupon, avoid payment method load#15carl-lee-lu wants to merge 1 commit intospree:mainfrom
Conversation
…methods as this will cause error.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughRefactored conditional logic in the payment methods template to simplify visibility controls. The initial condition was simplified to use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
When an order becomes fully paid through a promo code, the payment method tries to get loaded but in the case of stripe you don't create a payment intent for a free order which causes the route constraint to break. Additionally the order needs to be placed on the payment screen, not pay
This screenshot was with the change to payment rerquired but without updating the rest of the partial

This is with the full changes in place and a free coupon

Additionally tested with a gift card

And store credit

Summary by CodeRabbit