woocommerce_check_cart_items

woocommerce_check_cart_items

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_check_cart_items') is found 4 times:

  • /includes/class-wc-checkout.php line 328
    		 *
    		 * @see WC_Checkout::validate_checkout()
    		 * @since 3.0.0 or earlier
    		 */
    		do_action( 'woocommerce_check_cart_items' );
    	}
    
    	/**
    	 * Output the billing form.
    	 */
    	public function checkout_form_billing() {
    
  • /includes/shortcodes/class-wc-shortcode-cart.php line 93
    			WC()->cart->calculate_totals();
    		}
    
    		// Check cart items are valid.
    		do_action( 'woocommerce_check_cart_items' );
    
    		// Calc totals.
    		WC()->cart->calculate_totals();
    
    		if ( WC()->cart->is_empty() ) {
    			wc_get_template( 'cart/cart-empty.php' );
    
  • /includes/shortcodes/class-wc-shortcode-checkout.php line 351
    			return;
    		}
    
    		// Check cart contents for errors.
    		do_action( 'woocommerce_check_cart_items' );
    
    		// Calc totals.
    		WC()->cart->calculate_totals();
    
    		// Get checkout object.
    		$checkout = WC()->checkout();
    
  • /src/StoreApi/Utilities/CartController.php line 457
    		 *
    		 * @deprecated
    		 * @internal Matches action name in WooCommerce core.
    		 */
    		do_action( 'woocommerce_check_cart_items' );
    
    		$cart_errors = NoticeHandler::convert_notices_to_wp_errors( 'woocommerce_rest_cart_item_error' );
    
    		if ( $cart_errors->has_errors() ) {
    			throw new InvalidCartException(
    				'woocommerce_cart_error',
    

See this hook used in plugins: