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

Commit

Permalink
Mikes suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexflorisca authored and mikejolley committed Feb 14, 2023
1 parent 508f3fb commit a7bb488
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ export const usePaymentMethodInterface = (): PaymentMethodInterface => {
} );
return store.hasPaymentError();
},
isSuccessful: store.isPaymentReady(),
get isSuccessful() {
deprecated( 'isSuccessful', {
since: '9.6.0',
plugin: 'WooCommerce Blocks',
link: 'https://github.com/woocommerce/woocommerce-blocks/pull/8110',
} );
return store.isPaymentReady();
},
isReady: store.isPaymentReady(),
isDoingExpressPayment: store.isExpressPaymentMethodActive(),
},
activePaymentMethod: store.getActivePaymentMethod(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ export const PaymentEventsProvider = ( {
const store = select( PAYMENT_STORE_KEY );

return {
isPaymentReady: store.isPaymentReady(),
// The PROCESSING status represents befor the checkout runs the observers
// registered for the payment_setup event.
isPaymentProcessing: store.isPaymentProcessing(),
// the READY status represents when the observers have finished processing and payment data
// synced with the payment store, ready to be sent to the StoreApi
isPaymentReady: store.isPaymentReady(),
};
} );

Expand Down

0 comments on commit a7bb488

Please sign in to comment.