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.9.5

apply_filters('woocommerce_store_api_product_quantity_limit') is found 1 times:

  • /src/StoreApi/Utilities/QuantityLimits.php line 195
    		 * @param integer $quantity_limit Quantity limit which defaults to 9999 unless sold individually.
    		 * @param \WC_Product $product Product instance.
    		 * @return integer
    		 */
    		$filtered_limit = apply_filters( 'woocommerce_store_api_product_quantity_limit', $limit, $product );
    
    		// Only return the filtered limit if it's numeric, otherwise return the original limit.
    		return is_numeric( $filtered_limit ) ? (int) $filtered_limit : $limit;
    	}
    
    	/**