{
  "name": "bricks/filter_element/data_source_wcField",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-filter_element-data_source_wcfield/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/filter_element/data_source_wcField",
  "description": {
    "en": "Filters the data source (options) specifically for WooCommerce field filters. This allows you to customize the options displayed for WooCommerce filters like product visibility, stock status, etc.",
    "zh": "修改 Bricks 中已注册的图标库。默认情况下，Bricks 提供 SVGFluent 和 Thumbs 库。你可通过此筛选器注册你自己的图标库。"
  },
  "parameters": [
    {
      "name": "data_source",
      "type": "array",
      "type_zh": null,
      "description": {
        "en": "Array of filter options.",
        "zh": "筛选选项数组。"
      }
    },
    {
      "name": "element",
      "type": "object",
      "type_zh": null,
      "description": {
        "en": "The filter element instance.",
        "zh": "筛选元素实例。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/filter_element/data_source_wcField', function( $data_source, $element ) {\n    // Example: Add a custom option to a WooCommerce filter\n    // Note: You might need to check $element->settings to target specific WC fields\n    if ( isset( $element->settings['sourceFieldType'] ) && $element->settings['sourceFieldType'] === 'stock_status' ) {\n         // Modify stock status options\n    }\n\n\n    return $data_source;\n}, 10, 2 );"
}