WC_Form_Handler::checkout_action()
Process the checkout form.
Method of the class: WC_Form_Handler{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Form_Handler::checkout_action();
WC_Form_Handler::checkout_action() WC Form Handler::checkout action code WC 9.4.2
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(); } }