woocommerce_check_cart_items action-hookWC 3.0.0

Provides an opportunity to check cart items before checkout. This generally occurs during checkout validation.

Usage

add_action( 'woocommerce_check_cart_items', 'wp_kama_woocommerce_check_cart_items_action' );

/**
 * Function for `woocommerce_check_cart_items` action-hook.
 * 
 * @return void
 */
function wp_kama_woocommerce_check_cart_items_action(){

	// action...
}

Changelog

Since 3.0.0 Introduced.
Since 3.0.0 or earlier

Where the hook is called

WC_Checkout::check_cart_items()
woocommerce_check_cart_items
CartController::validate_cart()
woocommerce_check_cart_items
WC_Shortcode_Cart::output()
woocommerce_check_cart_items
WC_Shortcode_Checkout::checkout()
woocommerce_check_cart_items
woocommerce/includes/class-wc-checkout.php 328
do_action( 'woocommerce_check_cart_items' );
woocommerce/src/StoreApi/Utilities/CartController.php 457
do_action( 'woocommerce_check_cart_items' );
woocommerce/includes/shortcodes/class-wc-shortcode-cart.php 93
do_action( 'woocommerce_check_cart_items' );

Where the hook is used in WooCommerce

woocommerce/includes/class-wc-cart.php 110
add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_items' ), 1 );
woocommerce/includes/class-wc-cart.php 111
add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_coupons' ), 1 );
woocommerce/src/StoreApi/Utilities/CartController.php 442
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_items' ), 1 );
woocommerce/src/StoreApi/Utilities/CartController.php 443
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_coupons' ), 1 );