Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
set status to started instead of pristine to keep saved methods
Browse files Browse the repository at this point in the history
  • Loading branch information
senadir committed Dec 6, 2021
1 parent ba2bdd0 commit 28a8c8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] );

Expand Down

0 comments on commit 28a8c8c

Please sign in to comment.