WordPress at Your Fingertips
function is not described

WC_Form_Handler::checkout_action() public WC 1.0

Process the checkout form.

{} It's a method of the class: WC_Form_Handler{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Form_Handler::checkout_action();

Code of WC_Form_Handler::checkout_action() WC 5.6.0

public static function checkout_action() {
	if ( isset( $_POST['woocommerce_checkout_place_order'] ) || isset( $_POST['woocommerce_checkout_update_totals'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
		wc_nocache_headers();

		if ( WC()->cart->is_empty() ) {
			wp_safe_redirect( wc_get_cart_url() );
			exit;
		}

		wc_maybe_define_constant( 'WOOCOMMERCE_CHECKOUT', true );

		WC()->checkout()->process_checkout();
	}
}