Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
base
/
context
/
hooks
/
payment-methods
:
use-payment-methods.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * Internal dependencies */ import { usePaymentMethodDataContext } from '../../providers/cart-checkout/payment-methods'; const usePaymentMethodState = ( express = false ) => { const { paymentMethods, expressPaymentMethods, paymentMethodsInitialized, expressPaymentMethodsInitialized, } = usePaymentMethodDataContext(); return express ? { paymentMethods: expressPaymentMethods, isInitialized: expressPaymentMethodsInitialized, } : { paymentMethods, isInitialized: paymentMethodsInitialized }; }; export const usePaymentMethods = () => usePaymentMethodState(); export const useExpressPaymentMethods = () => usePaymentMethodState( true );