woocommerce_breadcrumb_main_term
Использование
add_filter( 'woocommerce_breadcrumb_main_term', 'wp_kama_woocommerce_breadcrumb_main_term_filter', 10, 2 ); /** * Function for `woocommerce_breadcrumb_main_term` filter-hook. * * @param $terms[0] * @param $terms * * @return */ function wp_kama_woocommerce_breadcrumb_main_term_filter( $terms[0], $terms ){ // filter... return $terms[0]; }
- $terms[0]
- -
- $terms
- -
Где вызывается хук
woocommerce_breadcrumb_main_term
woocommerce/includes/class-wc-breadcrumb.php 163
$main_term = apply_filters( 'woocommerce_breadcrumb_main_term', $terms[0], $terms );