WC_Form_Handler::checkout_action()
Process the checkout form.
Description Description
Source Source
File: includes/class-wc-form-handler.php
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();
}
}