Hook woof_filter_title (since v.3.3.6) all headings of both taxonomy and meta filters pass through this filter, so you can translate headings in your own way, code example:
add_filter('woof_filter_title', function($title, $tax_info, $index) {
if (is_object($tax_info) && $tax_info->name == 'pa_size') {
$title = '尺寸'; // Chinese characters for "size"
}
return $title;
}, 10, 3);
[...]
Hook woof_turbo_mode_schedules (since v.3.3.6) allows to add custom periods for products parameters updates in turbo mode, code example:
add_filter('woof_turbo_mode_schedules', function($schedules) {
$schedules = array(
'name' => 'any name',
'value' => 777 // time in seconds
);
return $schedules;
});
[...]
Made its possible to change the counter format – by default it transmits ‘(%d)‘
Example:
add_filter('woof_term_count_format', function ($format, $tax_slug) {
$format = '|%d|';
return $format;
}, 10, 2);
[...]
Allows to manipulate by text filtering using posts ids, requested in ticket https://pluginus.net/support/topic/filter-on-title-description-separate-sku-filter/
[...]
Allows to add into checkbox and radio tag labels custom attributes, requested in ticket https://pluginus.net/support/topic/aria-describedby/#postid-82977
Example:
add_action('woof_print_label_attributes', function ($term) {
echo"aria-descrybedby aria-name='{$term}'";
});
[...]
This hook allows to set minimum price for HUSKY price filter by your own logic
Use next code in file functions.php of the current WordPress theme:
add_filter('woof_min_price_filter', function ($min) {
return 20;
});
[...]
This hook allows to set maximum price for HUSKY price filter by your own logic
Use next code in file functions.php of the current WordPress theme:
add_filter('woof_max_price_filter', function ($max) {
return 120;
});
[...]
This hook allows to add custom JavaScript variables to the site front if necessary
add_action('woof_wp_load_js', function ($str) {
$str .= ';var my_var1="Hello";';
$str .= 'var my_var2=2023;';
return $str;
});
[...]
Hook woof_seo_do_index is for extension SEO URL . This is for more flexible indexing control. For example, the user does not want to index only red products:
add_filter('woof_seo_do_index', function ($do_index, $curr_url, $request_data) {
if (isset($request_data)) {
$colors = explode(',', $request_data);
if (in_array('red', $colors)) {
$do_index = false;
}
}
return $do_index;
}, 10, 3);
[...]
Hook woof_custom_filter_items_order gives ability to change the order of filter elements, passes an array of filter keys (you can find filter section key if to click on additional options of it in tab Structure)
Example:
add_filter('woof_custom_filter_items_order', function($order){
//your code here
$order=;
return $order;
});
[...]