woocommerce_check_cart_items хук-событиеWC 1.0

When we process the checkout, lets ensure cart items are rechecked to prevent checkout.

Использование

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...
}

Где вызывается хук

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 289
do_action( 'woocommerce_check_cart_items' );
woocommerce/includes/shortcodes/class-wc-shortcode-cart.php 91
do_action( 'woocommerce_check_cart_items' );
woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php 295
do_action( 'woocommerce_check_cart_items' );

Где используется хук в 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/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php 419
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_items' ), 1 );
woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php 420
remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_coupons' ), 1 );