mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Add methods prop to enable button
This commit is contained in:
parent
cb7682b362
commit
381fe248e3
2 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,8 @@ const ALL_STEPS = [
|
|||
id: 'methods',
|
||||
title: __( 'Choose checkout options', 'woocommerce-paypal-payments' ),
|
||||
StepComponent: StepPaymentMethods,
|
||||
canProceed: () => true,
|
||||
canProceed: ( { methods } ) =>
|
||||
methods.areOptionalPaymentMethodsEnabled !== null,
|
||||
},
|
||||
{
|
||||
id: 'complete',
|
||||
|
|
|
@ -136,10 +136,12 @@ export const useSteps = () => {
|
|||
export const useNavigationState = () => {
|
||||
const products = useProducts();
|
||||
const business = useBusiness();
|
||||
const methods = useOptionalPaymentMethods();
|
||||
|
||||
return {
|
||||
products,
|
||||
business,
|
||||
methods,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue