woocommerce_checkout_order_created action-hookWC 4.3.0

Action hook fired after an order is created.

Usage

add_action( 'woocommerce_checkout_order_created', 'wp_kama_woocommerce_checkout_order_created_action' );

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

	// action...
}
$order
-

Changelog

Since 4.3.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

woocommerce/includes/wc-stock-functions.php 357
add_action( 'woocommerce_checkout_order_created', 'wc_reserve_stock_for_order' );