woocommerce_widget_layered_nav_term_anchor_text хук-фильтрWC 8.8.0

Allows the attribute term name to be modified before being output.

Использование

add_filter( 'woocommerce_widget_layered_nav_term_anchor_text', 'wp_kama_woocommerce_widget_layered_nav_term_anchor_text_filter', 10, 3 );

/**
 * Function for `woocommerce_widget_layered_nav_term_anchor_text` filter-hook.
 * 
 * @param string  $term_name The name of the term.
 * @param WP_Term $term      The term object.
 * @param string  $taxonomy  The taxonomy name.
 *
 * @return string
 */
function wp_kama_woocommerce_widget_layered_nav_term_anchor_text_filter( $term_name, $term, $taxonomy ){

	// filter...
	return $term_name;
}
$term_name(строка)
The name of the term.
$term(WP_Term)
The term object.
$taxonomy(строка)
The taxonomy name.

Список изменений

С версии 8.8.0 Введена.

Где вызывается хук

WC_Widget_Layered_Nav_Filters::widget()
woocommerce_widget_layered_nav_term_anchor_text
woocommerce/includes/widgets/class-wc-widget-layered-nav-filters.php 99
$anchor_text = apply_filters( 'woocommerce_widget_layered_nav_term_anchor_text', $term->name, $term, $taxonomy );

Где используется хук в WooCommerce

Использование не найдено.