WordPress at a glance
filter is not described

woocommerce_cart_item_required_stock_is_not_enough filter-hook . WC 4.6.0

Allows filter if product have enough stock to get added to the cart.

Usage

add_filter( 'woocommerce_cart_item_required_stock_is_not_enough', 'filter_function_name_3945', 10, 3 );
function filter_function_name_3945( $has_stock, $product, $values ){
	// filter...

	return $has_stock;
}
$has_stock(true|false)
If have enough stock.
$product(WC_Product)
Product instance.
$values(array)
Cart item values.

Changelog

Since 4.6.0 Introduced.

Where the hook is called

WC_Cart::check_cart_item_stock()
woocommerce_cart_item_required_stock_is_not_enough
woocommerce/includes/class-wc-cart.php 789
if ( apply_filters( 'woocommerce_cart_item_required_stock_is_not_enough', $product->get_stock_quantity() < ( $held_stock + $required_stock ), $product, $values ) ) {

Where in WP core the hook is used WooCommerce

Usage not found.