woocommerce/plugins/woocommerce-blocks/assets/js/base/hooks/checkout/use-checkout-submit.js

13 lines
318 B
JavaScript

/**
* External dependencies
*/
import { useCheckoutContext } from '@woocommerce/base-context';
/**
* Returns the submitLabel and onSubmit interface from the checkout context
*/
export const useCheckoutSubmit = () => {
const { submitLabel, onSubmit } = useCheckoutContext();
return { submitLabel, onSubmit };
};