WordPress at a glance
filter is not described

woocommerce_add_to_cart_validation filter-hook . WC 1.0

Hook: woocommerce_add_to_cart_validation (legacy).

Allow 3rd parties to validate if an item can be added to the cart. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to exceptions instead.

Usage

add_filter( 'woocommerce_add_to_cart_validation', 'filter_function_name_6656', 10, 5 );
function filter_function_name_6656( $true, $product_id, $request_quantity, $variation_id, $request_variation ){
	// filter...

	return $true;
}
$true
-
$product_id
-
$request_quantity
-
$variation_id
-
$request_variation
-

Where the hook is called

CartController::validate_add_to_cart()
woocommerce_add_to_cart_validation
WC_Form_Handler::add_to_cart_handler_simple()
woocommerce_add_to_cart_validation
WC_Form_Handler::add_to_cart_handler_grouped()
woocommerce_add_to_cart_validation
WC_Form_Handler::add_to_cart_handler_variable()
woocommerce_add_to_cart_validation
WC_AJAX::add_to_cart()
woocommerce_add_to_cart_validation
WC_Cart_Session::populate_cart_from_order()
woocommerce_add_to_cart_validation
woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php 201-208
$passed_validation = apply_filters(
	'woocommerce_add_to_cart_validation',
	true,
	$this->get_product_id( $product ),
	$request['quantity'],
	$this->get_variation_id( $product ),
	$request['variation']
);
woocommerce/includes/class-wc-form-handler.php 822
$passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity );
woocommerce/includes/class-wc-form-handler.php 854
$passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $item, $quantity );
woocommerce/includes/class-wc-form-handler.php 904
$passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity, $variation_id, $variations );
woocommerce/includes/class-wc-ajax.php 410
$passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity );
woocommerce/includes/class-wc-cart-session.php 378
if ( ! apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity, $variation_id, $variations, $cart_item_data ) ) {

Where in WP core the hook is used WooCommerce

woocommerce/includes/wc-cart-functions.php 29
add_filter( 'woocommerce_add_to_cart_validation', 'wc_protected_product_add_to_cart', 10, 2 );