woocommerce_checkout_order_exception action-hookWC 4.3.0

Action hook fired when an order is discarded due to Exception.

Usage

add_action( 'woocommerce_checkout_order_exception', 'wp_kama_woocommerce_checkout_order_exception_action' );

/**
 * Function for `woocommerce_checkout_order_exception` action-hook.
 * 
 * @param  $order 
 *
 * @return void
 */
function wp_kama_woocommerce_checkout_order_exception_action( $order ){

	// action...
}
$order
-

Changelog

Since 4.3.0 Introduced.

Where the hook is called

WC_Checkout::create_order()
woocommerce_checkout_order_exception
woocommerce/includes/class-wc-checkout.php 416
do_action( 'woocommerce_checkout_order_exception', $order );

Where the hook is used in WooCommerce

woocommerce/includes/wc-stock-functions.php 383
add_action( 'woocommerce_checkout_order_exception', 'wc_release_stock_for_order' );