Filter: bricks/filter_element/count_source_wcField
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.
Parameters
Section titled “Parameters”$count_source(array): Associative array where keys are filter values and values are their respective counts.$element(object): The filter element instance.
Example usage
Section titled “Example usage”add_filter( 'bricks/filter_element/count_source_wcField', function( $count_source, $element ) { // Example: Hide counts for rating filter by setting them to 0 (if logic hides 0 counts) // Or manipulate them for specific ratings return $count_source;}, 10, 2 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.