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 343
do_action( 'woocommerce_check_cart_items' );
woocommerce/src/StoreApi/Utilities/CartController.php 525
do_action( 'woocommerce_check_cart_items' );
woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php 349
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 135
add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_items' ), 1 );
woocommerce/includes/class-wc-cart.php 136
add_action( 'woocommerce_check_cart_items', array( $this, 'check_cart_coupons' ), 1 );
woocommerce/src/StoreApi/Utilities/CartController.php 507
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_items' ), 1 );
woocommerce/src/StoreApi/Utilities/CartController.php 508
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_coupons' ), 1 );