woof_get_min_price
Filters the minimum price value used for the price range slider, allowing modification of the lower price bound.
Parameters
$min_price (int) — The calculated minimum price (floored), derived from the database or WooCommerce product prices
$additional_taxes (string) — Additional tax query string used in the price calculation query
Source File
classes/helper.php:782
Code Example
add_filter('woof_get_min_price', function($min, $additional_taxes) {
// Ensure minimum price is at least 0
return max($min, 0);
}, 10, 2);
Usage Notes
- The min price is computed via SQL MIN() queries against _price and _min_variation_price meta keys.
- Two query paths exist: one for WooCommerce 2.6+ using get_filtered_price(), and one for older versions.
- The value is always floor()'d before being passed to the filter.