woocommerce_product_categories_widget_main_term хук-фильтр . WC 1.0
Использование
add_filter( 'woocommerce_product_categories_widget_main_term', 'filter_function_name_5681', 10, 2 ); function filter_function_name_5681( $terms[0], $terms ){ // filter... return $terms[0]; }
- $terms[0]
- -
- $terms
- -
Где вызывается хук
woocommerce_product_categories_widget_main_term
woocommerce/includes/widgets/class-wc-widget-product-categories.php 149
$main_term = apply_filters( 'woocommerce_product_categories_widget_main_term', $terms[0], $terms );