list_product_cats
Usage
add_filter( 'list_product_cats', 'wp_kama_list_product_cats_filter', 10, 2 );
/**
* Function for `list_product_cats` filter-hook.
*
* @param $name
* @param $cat
*
* @return
*/
function wp_kama_list_product_cats_filter( $name, $cat ){
// filter...
return $name;
}
- $name
- -
- $cat
- -
Where the hook is called
list_product_cats
list_product_cats
woocommerce/includes/walkers/class-wc-product-cat-dropdown-walker.php 58
$cat_name = apply_filters( 'list_product_cats', $cat->name, $cat );
woocommerce/includes/walkers/class-wc-product-cat-list-walker.php 105
$output .= '"><a href="' . get_term_link( $cat_id, $this->tree_type ) . '">' . apply_filters( 'list_product_cats', $cat->name, $cat ) . '</a>';