woocommerce_check_cart_items
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
woocommerce_check_cart_items
woocommerce_check_cart_items
woocommerce_check_cart_items
woocommerce_check_cart_items
woocommerce/includes/class-wc-checkout.php 342
do_action( 'woocommerce_check_cart_items' );
woocommerce/src/StoreApi/Utilities/CartController.php 493
do_action( 'woocommerce_check_cart_items' );
woocommerce/includes/shortcodes/class-wc-shortcode-cart.php 93
do_action( 'woocommerce_check_cart_items' );
woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php 352
do_action( 'woocommerce_check_cart_items' );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-cart.php 112
add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_items' ), 1 );
woocommerce/includes/class-wc-cart.php 113
add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_coupons' ), 1 );
woocommerce/src/StoreApi/Utilities/CartController.php 478
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_items' ), 1 );
woocommerce/src/StoreApi/Utilities/CartController.php 479
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_coupons' ), 1 );