HUSKY - Product Filter for WooCommerce

woof_url_parser_all_data

Filters the entire data array passed to the JavaScript URL parser, allowing modification of filter key mappings for SEO-friendly URL parsing.

Parameters

$all_data (array) — Array with 'filters' (assoc of real_key => encoded_key) and 'special' (assoc of special filter keys) mappings

Source File

ext/url_request/index.php:120

Code Example

add_filter('woof_url_parser_all_data', function($data) {
    // Add a custom filter key mapping
    $data['filters']['my_custom_filter'] = 'mcf';
    return $data;
});

Usage Notes

  • Used to localize the url_parser_data JavaScript variable via wp_localize_script.
  • Meta filter keys are remapped to include their search_view prefix (e.g. 'textinput_meta_key').
  • The data includes the inverse mapping from the url_parser->get_all_items() output.