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

Commit 294c203

Browse files
committed
Mikes suggestions
1 parent 2994774 commit 294c203

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

assets/js/base/context/hooks/payment-methods/use-payment-method-interface.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,15 @@ export const usePaymentMethodInterface = (): PaymentMethodInterface => {
9191
} );
9292
return store.hasPaymentError();
9393
},
94-
isSuccessful: store.isPaymentReady(),
94+
get isSuccessful() {
95+
deprecated( 'isSuccessful', {
96+
since: '9.6.0',
97+
plugin: 'WooCommerce Blocks',
98+
link: 'https://github.com/woocommerce/woocommerce-blocks/pull/8110',
99+
} );
100+
return store.isPaymentReady();
101+
},
102+
isReady: store.isPaymentReady(),
95103
isDoingExpressPayment: store.isExpressPaymentMethodActive(),
96104
},
97105
activePaymentMethod: store.getActivePaymentMethod(),

assets/js/base/context/providers/cart-checkout/payment-events/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ export const PaymentEventsProvider = ( {
6565
const store = select( PAYMENT_STORE_KEY );
6666

6767
return {
68-
isPaymentReady: store.isPaymentReady(),
68+
// The PROCESSING status represents befor the checkout runs the observers
69+
// registered for the payment_setup event.
6970
isPaymentProcessing: store.isPaymentProcessing(),
71+
// the READY status represents when the observers have finished processing and payment data
72+
// synced with the payment store, ready to be sent to the StoreApi
73+
isPaymentReady: store.isPaymentReady(),
7074
};
7175
} );
7276

0 commit comments

Comments
 (0)