Purpose: Modify the meta description tag for filtered product pages.
This hook allows you to customize the <meta name="description"> content for pages with active WOOF filters. By default, WOOF generates meta descriptions based on SEO rules you configure, but this filter lets you modify them programmatically.
add_filter('woof_seo_meta_description', function($description) {
// Modify the description
return $description;
}, 10, 1);
Examples:
Add custom branding to all filter descriptions:
add_filter('woof_seo_meta_description', function($description) {
if (!empty($description)) {
$description .= ' | MyShop - Free Shipping Worldwide';
}
return $description;
});
Shorten long descriptions:
add_filter('woof_seo_meta_description', function($description) {
// Limit to 160 characters for optimal SEO
if (strlen($des [...]
Purpose: Disable WOOF plugin on specific pages or conditions.
This hook allows you to completely disable WOOF plugin functionality on certain pages, post types, or custom conditions. When this filter returns true, WOOF will not initialize on that page.
add_filter('woof_disable_filter', function($disable) {
if (is_page(array(123, 456))) {
return true; // Disable on pages 123 and 456
}
return $disable;
});
Disable on checkout and cart:
add_filter('woof_disable_filter', function($disable) {
if (current_user_can('administrator')) {
return true; // Disable for admins
}
return $disable;
});
Disable on custom post types:
add_filter('woof_disable_filter', function($disable) {
if (is_singular('custom_post_type')) {
return true;
}
return $disable;
});
[...]
Allows to set custom title for ‘In stock‘ checkbox in the filter form.
Also you can translate it using plugin Loco Translate
[...]
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;
});
[...]