{
  "name": "bricks/filter_element/count_source_wcField",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-filter_element-count_source_wcfield/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/filter_element/count_source_wcField",
  "description": {
    "en": "Filters the count data specifically for WooCommerce field filters (e.g., price, rating). This allows you to customize the counts displayed next to filter options.",
    "zh": "此筛选器允许你修改 Bricks 页头的最终 HTML 输出。"
  },
  "parameters": [
    {
      "name": "count_source",
      "type": "array",
      "type_zh": null,
      "description": {
        "en": "Associative array where keys are filter values and values are their respective counts.",
        "zh": "关联数组，键为筛选值，值为对应的计数。"
      }
    },
    {
      "name": "element",
      "type": "object",
      "type_zh": null,
      "description": {
        "en": "The filter element instance.",
        "zh": "筛选元素实例。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/filter_element/count_source_wcField', function( $count_source, $element ) {\n    // Example: Hide counts for rating filter by setting them to 0 (if logic hides 0 counts)\n    // Or manipulate them for specific ratings\n    return $count_source;\n}, 10, 2 );"
}