woof_get_max_price
Filters the maximum price value used for the price range slider, allowing modification of the upper price bound.
Parameters
$max_price (int) — The calculated maximum price (ceiling), 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:739
Code Example
add_filter('woof_get_max_price', function($max, $additional_taxes) {
// Cap the max price at 1000
return min($max, 1000);
}, 10, 2);
Usage Notes
- The max price is computed via SQL queries against _price and _min_variation_price meta keys.
- When a specific product ID is returned by WooCommerce layered nav, its price including tax is used.
- The value is always ceil()'d before being passed to the filter.