Only set to pristine when checkout is idle, not when idle status changes (https://github.com/woocommerce/woocommerce-blocks/pull/2485)
This commit is contained in:
parent
631a07dbf2
commit
e5c500c70d
|
@ -268,7 +268,7 @@ export const PaymentMethodDataProvider = ( { children } ) => {
|
|||
// When checkout is returned to idle, set payment status to pristine
|
||||
// but only if payment status is already not finished.
|
||||
useEffect( () => {
|
||||
if ( ! currentStatus.isSuccessful ) {
|
||||
if ( checkoutIsIdle && ! currentStatus.isSuccessful ) {
|
||||
dispatch( statusOnly( PRISTINE ) );
|
||||
}
|
||||
}, [ checkoutIsIdle, currentStatus.isSuccessful ] );
|
||||
|
|
Loading…
Reference in New Issue