woocommerce_update_cart_validation

woocommerce_update_cart_validation

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_update_cart_validation') is found 1 times:

  • /includes/class-wc-form-handler.php line 697
    						continue;
    					}
    
    					// Update cart validation.
    					$passed_validation = apply_filters( 'woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity );
    
    					// is_sold_individually.
    					if ( $_product->is_sold_individually() && $quantity > 1 ) {
    						/* Translators: %s Product title. */
    						wc_add_notice( sprintf( __( 'You can only have 1 %s in your cart.', 'woocommerce' ), $_product->get_name() ), 'error' );
    						$passed_validation = false;