list_product_cats хук-фильтр . WC 1.0
Использование
add_filter( 'list_product_cats', 'filter_function_name_1981', 10, 2 ); function filter_function_name_1981( $name, $cat ){ // filter... return $name; }
- $name
- -
- $cat
- -
Где вызывается хук
list_product_cats
list_product_cats
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>';
woocommerce/includes/walkers/class-wc-product-cat-dropdown-walker.php 58
$cat_name = apply_filters( 'list_product_cats', $cat->name, $cat );