From 28a8c8c0d1156af9c234eb8839f5a03a45fc44ca Mon Sep 17 00:00:00 2001 From: Nadir Seghir Date: Mon, 6 Dec 2021 13:30:12 +0100 Subject: [PATCH] set status to started instead of pristine to keep saved methods --- .../payment-methods/payment-method-data-context.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/base/context/providers/cart-checkout/payment-methods/payment-method-data-context.tsx b/assets/js/base/context/providers/cart-checkout/payment-methods/payment-method-data-context.tsx index c8c6da01254..30379bfb5d9 100644 --- a/assets/js/base/context/providers/cart-checkout/payment-methods/payment-method-data-context.tsx +++ b/assets/js/base/context/providers/cart-checkout/payment-methods/payment-method-data-context.tsx @@ -222,7 +222,7 @@ export const PaymentMethodDataProvider = ( { // When checkout is returned to idle, set payment status to pristine but only if payment status is already not finished. useEffect( () => { if ( checkoutIsIdle && ! currentStatus.isSuccessful ) { - setPaymentStatus().pristine(); + setPaymentStatus().started(); } }, [ checkoutIsIdle, currentStatus.isSuccessful, setPaymentStatus ] );