HUSKY - Product Filter for WooCommerce

woof_extensions_type_index

Filters the comma-separated list of extension type indexes that are included in the JavaScript woof_accept_array, defining which filter keys the frontend JavaScript will accept.

Parameters

$indexes (string) — A comma-separated string of quoted extension type index values (e.g. '"min_rating","featured","onsales"')

Source File

index.php:1184

Code Example


add_filter('woof_extensions_type_index', function($indexes) {
    // Remove min_rating from accepted filters
    return str_replace('"min_rating",', '', $indexes);
});

Usage Notes

  • The indexes come from WOOF_EXT::$includes['html_type_objects'] where each object has an 'index' property.
  • 'min_rating' is always appended to the array before implosion.
  • The resulting string is escaped via esc_js() and used in inline JavaScript.