woof_get_filtered_price_query
From ver.2.2.4/1.2.4
This hook is added for compatibility with other plugins.
- file: \classes\helper.php
- public static function get_filtered_price

Parameters
$sql (string) — the SQL query used to select prices
Source File
classes/helper.php
Code Example
add_filter('woof_get_filtered_price_query', function($sql) {
// Modify the price range SQL query
// For example, to exclude certain product types from price calculation
global $wpdb;
$sql .= " AND {$wpdb->posts}.post_type NOT IN ('excluded_type')";
return $sql;
});
Usage Notes
- Add this code to your theme's
functions.phpfile or a custom plugin. - The hook is applied during the filtering process — changes take effect immediately.
- Always return the expected value type from the callback function.