woocommerce_widget_layered_nav_term_anchor_text
Allows the attribute term name to be modified before being output.
Usage
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(string)
- The name of the term.
- $term(WP_Term)
- The term object.
- $taxonomy(string)
- The taxonomy name.
Changelog
Since 8.8.0 | Introduced. |
Where the hook is called
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 );