HUSKY - Products Filter Professional for WooCommerce
CODEX

Shortcodes, Hooks & Extensions

Complete reference for HUSKY – WooCommerce Products Filter Professional

  1. SC [[woof]] Main shortcode for the WooCommerce Products Filter. Generates search form. Design: 1 page - 1 filter, not possible to place some filters on the same…
  2. SC [[woof_author_filter]] Filter by authors ID and represented as drop-down on the front of the site. To use this shortcode should be activated extension Searching by Author placeholder …
  3. SC [[woof_btn]] Allows to generate special button to show/hide search form. Displays a button to hide the filter. Works based on shortcode attribute 'autohide'. Example of using:…
  4. SC [[woof_found_count]] Shows count of found products. Drop it in the usual text-widget with any text you need or use it in the hook woof_print_content_before_search_form. From: v.2.1.6  
  5. SC [[woof_front_builder]] From v.2.3.4/1.3.4 This shortcode allows to create filter form directly on the site front using special constructor. Here is the demo page where you can…
  6. SC [[woof_mobile]] This shortcode adds a container to which mobile button is inserted. Mobile button appears on mobile devices to call hidden WOOF filter form and display…
  7. SC [[woof_price_filter]] Price filter as drop-down OR as slider. This shortcode has 3 optional attributes type - slider, select,text additional_taxes - Example -> product_cat:9 - its like special…
  8. SC [[woof_products]] Second main shortcode of the plugin. Its allows out products on pages of the site. All attributes of the shortcode is optional. per_page - products per page…
  9. SC [[woof_products_messenger]] No attributes. Description is here.  
  10. SC [[woof_quick_search]] Should be activated extension: Quick Search preload - (1/0)if 1 its loads data file immediately after page loading, if 0 - only after user his start…
  11. SC [[woof_quick_search_results]] Should be activated extension: Quick Search per_page - products per page template_result - should be defined and there is is 5 predefined templates: list_1 | list_2 |…
  12. SC [[woof_save_query]] Purpose: Allow logged-in users to save their current filter selections for quick access later. Description This shortcode displays a widget where users can save their…
  13. SC [[woof_search_options]] Generates search navigation if search is going (red buttons). Has no options.  
  14. SC [[woof_sku_filter]] Generates textinput on the site. Has only one optional attribute. Conditions of searching is on the settings page of the plugin which is accessible after activation…
  15. SC [[woof_step]] This shortcode allows create step by step filter wizard for your customers. Attributes: by_step - main attribute in this shortcode where should be placed keys…
  16. SC [[woof_text_filter]] Generates textinput on the shop to search woocommerce products by text. Dev name is HUSKY. Can do searching by: title content excerpt meta fields taxonomies…
  1. do_action woof_after_draw_filter Works after print of each filter element in WOOF filter form. add_action('woof_after_draw_filter', function($key, $shortcode_atts) { //do smth here }, 99, 2); From v.2.2.5/1.2.5  
  2. do_action woof_before_draw_filter Works before print of each filter element in WOOF filter form. add_action('woof_before_draw_filter', function($key, $shortcode_atts) { //do here }, 99, 2); From v.2.2.5/1.2.5  
  3. do_action woof_exclude_existing_variations From v.2.2.6 Improves in stock search. Need because not everyone needs variations in the search results and also allows avoid excess requests. By default is…
  4. do_action woof_image_allow_term_desc From v.2.2.6 By default a description of the term is added for pictures, now it can be turned off. By default is true. Example: add_filter('woof_image_allow_term_desc',…
  5. do_action woof_meta_options_separator From v.2.2.6 Need to replace comma separator in options , useful if meta contains a comma as part of an option, example: add_filter('woof_meta_options_separator', function ($sep)…
  6. do_action woof_mobile_btn_place_container From v.2.2.6 Allows to override the selector where the mobile filter button should appear. By default is css class '.woocommerce-products-header'. Code example: add_filter('woof_mobile_btn_place_container', function ($selector)…
  7. do_action woof_override_seo_request_uri From v.2.2.6/1.2.6 Uses for extension 'SEO URL request' - passes the current URL. Need to adapt different servers if necessary
  8. do_action woof_print_design_additional_options Using in extensions to add additional options in tab Design if its necessary. Example: add_action('woof_print_design_additional_options', array($this, 'my_design_additional_options'), 10, 1); public function my_design_additional_options() { global $WOOF;…
  9. do_action woof_print_html_type_options_{type} Using by all extensions for drawing settings block in tab Settings of the plugin settings page [inpost_fancy thumb_width="200" thumb_height="200" post_id="279" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200" thumb_shadow="0 1px…
  10. do_action woof_print_html_type_{type} Using by extensions to draw self on the front Its enough just in init of an extension write next code: add_action('woof_print_html_type_' . $this->html_type, array($this, 'print_html_type'),…
  11. do_action woof_print_tax_additional_options_{type} Using in extension for printing additional options under 'additional options' button like in color: [inpost_fancy thumb_width="200" thumb_height="200" post_id="281" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200" thumb_shadow="0 1px 4px rgba(0,…
  12. do_action woof_seo_request_literals From v.2.2.6/1.2.6 Uses for extension 'SEO URL request' - allows to add possible literal variables that can be inserted into the SEO rules fields. Example…
  13. do_action woof_seo_rules_langs From v.2.2.6/1.2.6 Uses for extension 'SEO URL request' and allows to add additional languages for plugins like Polylang Example: add_filter('woof_seo_rules_langs',function($langs){ $langs = array_merge($langs, array('en_US', 'es_ES'));…
  14. do_action woof_wp_load_js 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…
  1. apply_filters woof_add_html_types Using in taxonomy type extensions for adding its keys in system for to make the extension visible Example: add_filter('woof_add_html_types', array($this, 'woof_add_html_types')); public function woof_add_html_types($types) {…
  2. apply_filters woof_add_items_keys Using in 'by_' extensions for adding its keys in system for to make the extension visible Example: add_filter('woof_add_items_keys', array($this, 'woof_add_items_keys')); public function woof_add_items_keys($keys) { $keys[]…
  3. apply_filters woof_before_term_name Uses in html types as: radio, checkbox, select, mselect for printing any symbols or icons before its label [inpost_fancy thumb_width="200" thumb_height="200" post_id="275" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200"…
  4. apply_filters woof_block_toggle_state Allows manipulation by taxonomies blocks toggle state, for example make them closed on mobile devices: add_filter('woof_block_toggle_state', function($block_is_closed) { if (wp_is_mobile()) { $block_is_closed = true; }…
  5. apply_filters woof_clear_all_text Allows to change text for 'Clear all' button in the search navigation panel add_filter('woof_clear_all_text', function($default_text) { return 'Clear the filter'; }, 99, 1); From v.2.2.5/1.2.5…
  6. apply_filters woof_counter_method For experiments of developers about memory overloading in Dynamic recount. This hook uses in file: wp-content\plugins\woocommerce-products-filter\classes\counter.php In __constructor of class WP_QueryWoofCounter When this hook returns TRUE in…
  7. apply_filters woof_custom_filter_items_order 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…
  8. apply_filters woof_delete_img_url Allows to change image url for delete-image. add_filter('woof_delete_img_url', function($current_img) { return 'https://my-site.com/wp-content/my-woof-del.png'; }, 10, 1); From v.2.2.5.6  
  9. apply_filters woof_disable_filter 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…
  10. apply_filters woof_ext_custom_title_by_instock Allows to set custom title for 'In stock' checkbox in the filter form. Also you can translate it using plugin Loco Translate  
  11. apply_filters woof_ext_custom_title_XXX Changes label for checkbox of 3 next extensions: In stock checkbox, Featured products, On sales checkbox. Instead of 'XXX' use: by_instock, by_featured, by_onsales From v.1.1.8/2.1.8  
  12. apply_filters woof_filter_shortcode_args Hook for shortcode [woof] for changing shortcode arguments on the fly depending of business conditions add_filter('woof_filter_shortcode_args', function($args) { //do smth with $args here return $args;…
  13. apply_filters woof_filter_title 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,…
  14. apply_filters 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
  15. apply_filters woof_get_meta_query This hook allows manipulations with meta query in WOOF search query: add_filter('woof_get_meta_query', function($meta_query) { //your code here return $meta_query; }); From v.2.2.1/1.2.1  
  16. apply_filters woof_get_more_less_button_XXXX Use this hook to manipulate by the button view for "Not toggled terms count" feature on the site front. XXXX - can be replaced to…
  17. apply_filters woof_get_request_data Uses in data-gate function of the plugin: index.php -> public function get_request_data() - it is first function in the plugin which get search request data Can be…
  18. apply_filters woof_get_tax_query Useful for taxonomies relations manipulation, for example changing relation from OR to AND. Doesn't work with dynamic recount together. index.php private function get_tax_query add_filter('woof_get_tax_query', 'my_woof_get_tax_query');…
  19. apply_filters woof_get_terms_args 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_terms
  20. apply_filters woof_get_terms_order Uses for ordering terms in the search form. classes/helper.php public static function get_terms Used in pair with woof_get_terms_orderby add_filter('woof_get_terms_order', function($taxonomy) { if ($taxonomy == 'pa_size')…
  21. apply_filters woof_get_terms_orderby Uses for ordering terms in the search form. classes/helper.php public static function get_terms Used in pair with woof_get_terms_order add_filter('woof_get_terms_orderby', function($taxonomy) { if ($taxonomy == 'pa_size') {…
  22. apply_filters woof_html_types_view_checkbox From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\checkbox.php  
  23. apply_filters woof_html_types_view_mselect From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\mselect.php  
  24. apply_filters woof_html_types_view_radio From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\radio.php  
  25. apply_filters woof_html_types_view_select From ver.2.2.4/1.2.4 Using this hook it is possible to rewrite view of file: \views\html_types\select.php  
  26. apply_filters woof_husky_query_post__in From v.2.2.9/v.1.2.9 There are two Husky filter modes: adding a search result with post__in (enabled by default). The advantage of this mode is reliability, because…
  27. apply_filters woof_husky_query_post__in Allows to manipulate by text filtering using posts ids, requested in ticket https://pluginus.net/support/topic/filter-on-title-description-separate-sku-filter/
  28. apply_filters woof_image_add_term_desc For filter-images (premium extension) - allows hide/show term description in tooltip. Default is: true. add_filter('woof_image_add_term_desc', function($tax_slug) { return false; }, 10, 1); [inpost_fancy thumb_width="200" thumb_height="200"…
  29. apply_filters woof_init_archive_by_default Allows to disable 'Enable archives' in product attributes if it is necessary do programmatically on the fly add_filter('woof_init_archive_by_default', function($is) { return false; }, 99, 1);…
  30. apply_filters woof_main_query_tax_relations This hook allows set logic 'AND' for any taxonomies in the WOOF search request. Use it in your current wp theme functions.php file: add_filter('woof_main_query_tax_relations', 'my_woof_main_query_tax_relations');…
  31. apply_filters woof_max_price_filter 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…
  32. apply_filters woof_min_price_filter 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…
  33. apply_filters woof_not_sort_checked_terms This hook is placed in the index.php of the plugin in public function woof_sort_terms_is_checked and allows excluding of html-types from impact of the option "Lets checked terms…
  34. apply_filters woof_order_catalog From v.2.2.4/1.2.4 Allows to add custom sort for catalog
  35. apply_filters woof_price_slider_html If you by any reason want to remade native woo price slider in the WOOF search form. classes/helper.php public static function price_filter apply_filters('woof_price_slider_html', $price_slider_html, $price_slider_data);
  36. apply_filters woof_print_content_before_redraw_zone From v.2.2.4/1.2.4 Allows to place above the products any business html-message which is not redrawn by AJAX  
  37. apply_filters woof_print_content_before_search_form This hooks allows to print any content before items of the WOOF search-form. Example: add_filter('woof_print_content_before_search_form', function($content) { global $WOOF; if ($WOOF AND woof()->is_isset_in_request_data(woof()->get_swoof_search_slug())) { return…
  38. apply_filters woof_print_label_attributes 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['name']}'"; });  
  39. apply_filters woof_products_query Using only 1 time in [woof_products] shortcode. Needs for any custom manipulations. [inpost_fancy thumb_width="200" thumb_height="200" post_id="267" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200" thumb_shadow="0 1px 4px rgba(0, 0, 0,…
  40. apply_filters woof_products_top_panel_content From ver.2.2.4/1.2.4 For displaying any business content on the top of the filtration results  
  41. apply_filters woof_qs_get_template_structure For extension: Quick Search Allows to change a column header of a table. Example: add_filter('woof_qs_get_template_structure', 'change_title'); function change_title($data) { if (isset($data['price'])) { $data['price']['title'] = "Price of…
  42. apply_filters woof_qs_shortcode_data For extension: Quick Search It is necessary to change the template parameters before loading the page - for example, depending on the device. [inpost_fancy thumb_width="200" thumb_height="200"…
  43. apply_filters woof_qs_sort_select_data For extension: Quick Search Allows to change sort headers of the table (when sorting in the form presented by drop-down) add_filter('woof_qs_sort_select_data', 'change_title'); function change_title($data) { if…
  44. apply_filters woof_quick_search_products_limit By default count of product is limited to 10,000. But you can extend this value: add_filter('woof_quick_search_products_limit', function($count){ return 30000; }); But remember - more products…
  45. apply_filters woof_redraw_elements_after_ajax Allows to add any messages while user make filtration in AJAX mode. Example: add_filter('woof_redraw_elements_after_ajax', function($fields, $query) { ob_start(); if (isset($query->query['tax_query']) AND $query->query['tax_query']) { $html =…
  46. apply_filters woof_seo_do_index 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…
  47. apply_filters woof_seo_meta_description 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…
  48. apply_filters woof_set_shortcode_taxonomyattr_behaviour This hook works in index.php of the plugin in public function woof_shortcode and allows to manipulate with 'additional_taxes'. [inpost_fancy thumb_width="200" thumb_height="200" post_id="1064" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200" thumb_shadow="0…
  49. apply_filters woof_slider_meta_query_type Hook woof_slider_meta_query_type is for meta slider values types, for example decimal values: add_filter('woof_slider_meta_query_type',function($type,$key){ return "DECIMAL(5,3)"; },2,10); [inpost_fancy thumb_width="200" thumb_height="200" post_id="1620" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200" thumb_shadow="0 1px…
  50. apply_filters woof_sort_terms_before_out Using in html types as checkbox or radio for any manipulation with array of terms if its necessary $terms = apply_filters('woof_sort_terms_before_out', $terms, 'checkbox'); wp-content\plugins\woocommerce-products-filter\views\html_types\checkbox.php
  51. apply_filters woof_sort_terms_checked
  52. apply_filters woof_start_filtering_btn_txt Hook for "Show products filter form" button which appears in the shortcode [woof start_filtering_btn=1] add_filter('woof_start_filtering_btn_txt', function($txt){ return "Load form!!"; }); From: v.2.1.6  
  53. apply_filters woof_step_filter_img_size From v.2.2.4/1.2.4 For resizing images in woof step filter. add_filter('woof_step_filter_img_size', function($size) { $size = 'large'; //thumbnail, medium, large, full, array(200, 200) //woocommerce_thumbnail ,woocommerce_single, woocommerce_gallery_thumbnail return…
  54. apply_filters woof_taxonomy_image Allows to redefine images of the image filter term on the fly depending of the current situation add_filter('woof_taxonomy_image', function($image, $term) { //change images on the…
  55. apply_filters woof_template_part Allows to change the template on the fly in shortcode [woof_products] [inpost_fancy thumb_width="200" thumb_height="200" post_id="1235" thumb_margin_left="5" thumb_margin_bottom="5" thumb_border_radius="200" thumb_shadow="0 1px 4px rgba(0, 0, 0, 0.2)"…
  56. apply_filters woof_terms_where_hidden_childs Uses for any term with child's terms when its necessary hide that child's terms  at all in: checkboxes, radio,select,mselect,labels. add_filter('woof_terms_where_hidden_childs', function($term_id) { $hide_array=array(11,22,33,44,55,66,77); if (in_array($term_id,…
  57. apply_filters woof_term_count_format 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;…
  58. apply_filters woof_text_autocomplete_items How many posts should return autocomplete functionality for Text textinput add_filter('woof_text_autocomplete_items', function($count){ return 5; });
  59. apply_filters woof_text_search_like_option This one regulate text search behavior and by default returns FALSE. If it will be return TRUE text searching will be working without considering special…
  60. apply_filters woof_text_search_query Allows to redefine text search SQL request on the fly add_filter('woof_text_search_query', function($where, $woof_text) { global $wpdb; $where .= "AND $wpdb->posts.ID IN(15,39,121)"; return $where; }, 99,…
  61. apply_filters woof_title_tag Use hook woof_title_tag if you want to redefine title tag H4 for each taxonomies block to any another HTML tag. Example: add_filter('woof_title_tag', function($tag){ return 'h5'; });…
  62. apply_filters woof_turbo_mode_schedules 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['your_custom_period_key'] = array( 'name'…
  63. apply_filters woof_use_wp_cache Hook woof_use_wp_cache is to enable object cache wp-cache which is more optimized. Showed good results in the tests. ATTENTION: it is obligatorily should be installed…
  64. apply_filters woof_widget_title_tag Use hook woof_widget_title_tag if you want to redefine title tag H3 for WOOF widget title to any another HTML tag. Example: add_filter('woof_widget_title_tag', function($tag){ return 'h4'; });