diff --git a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/submit.js b/includes/core/assets/js/frontend/payment-forms/stripe-checkout/submit.js index 78669d17..a8a28c93 100644 --- a/includes/core/assets/js/frontend/payment-forms/stripe-checkout/submit.js +++ b/includes/core/assets/js/frontend/payment-forms/stripe-checkout/submit.js @@ -47,8 +47,9 @@ async function submit( paymentForm ) { .create( { customer_id: customerId, - payment_method_type: - __unstableLegacyFormData.paymentMethods[ 0 ].id, + payment_method_type: __unstableLegacyFormData.paymentMethods + ? __unstableLegacyFormData.paymentMethods[ 0 ].id + : 'card', }, paymentForm )