woocommerce_cart_product_not_enough_stock_message

woocommerce_cart_product_not_enough_stock_message

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_cart_product_not_enough_stock_message') is found 1 times:

  • /includes/class-wc-cart.php line 1219
    				 * @param string     $message Message.
    				 * @param WC_Product $product_data Product data.
    				 * @param int        $stock_quantity Quantity remaining.
    				 */
    				$message = apply_filters( 'woocommerce_cart_product_not_enough_stock_message', $message, $product_data, $stock_quantity );
    
    				throw new Exception( $message );
    			}
    
    			// Stock check - this time accounting for whats already in-cart.
    			if ( $product_data->managing_stock() ) {