woocommerce_store_api_product_quantity_limit

woocommerce_store_api_product_quantity_limit

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_store_api_product_quantity_limit') is found 1 times:

  • /src/StoreApi/Utilities/QuantityLimits.php line 162
    		 * @param integer $quantity_limit Quantity limit which defaults to 9999 unless sold individually.
    		 * @param \WC_Product $product Product instance.
    		 * @return integer
    		 */
    		return apply_filters( 'woocommerce_store_api_product_quantity_limit', max( min( array_filter( $limits ) ), 1 ), $product );
    	}
    
    	/**
    	 * Returns the remaining stock for a product if it has stock.
    	 *
    	 * This also factors in draft orders.