givewp
givewp copied to clipboard
Fix: prevent Stripe Payment Element from rendering when amount is zero
Resolves GIVE-509
Description
This prevents the Stripe Payment Element from rendering when the donation amount is zero by adding a conditional before loading the fields.
Affects
Stripe payment element gateways
Visuals
Before:
After
Testing Instructions
- create a v3 form
- specify 0 for the amount
- click on stripe payment element
Pre-review Checklist
- [ ] Acceptance criteria satisfied and marked in related issue
- [ ] Relevant
@unreleasedtags included in DocBlocks - [ ] Includes unit tests
- [ ] Reviewed by the designer (if follows a design)
- [ ] Self Review of code and UX completed