diff --git a/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/stripePaymentElementGateway.tsx b/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/stripePaymentElementGateway.tsx index 3103d4e08c..8ba147dc53 100644 --- a/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/stripePaymentElementGateway.tsx +++ b/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/stripePaymentElementGateway.tsx @@ -91,6 +91,7 @@ interface StripeGateway extends Gateway { } /** + * @unreleased added fields conditional when donation amount is zero * @since 3.13.0 Use only stripeKey to load the Stripe script (when stripeConnectedAccountId is missing) to prevent errors when the account is connected through API keys * @since 3.12.1 updated afterCreatePayment response type to include billing details address * @since 3.0.0 @@ -212,6 +213,10 @@ const stripePaymentElementGateway: StripeGateway = { appearance: appearanceOptions, }; + if (donationAmount <= 0) { + return <>{__('Donation amount must be greater than zero to proceed.', 'give')}; + } + return (