Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
blocks
/
checkout
/
inner-blocks
/
checkout-express-payment-block
:
block.tsx
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { useStoreCart } from '@woocommerce/base-context/hooks'; /** * Internal dependencies */ import { CheckoutExpressPayment } from '../../../cart-checkout-shared/payment-methods'; const Block = ( { className }: { className?: string } ): JSX.Element | null => { const { cartNeedsPayment } = useStoreCart(); if ( ! cartNeedsPayment ) { return null; } return ( <div className={ className }> <CheckoutExpressPayment /> </div> ); }; export default Block;