woocommerce_product_attribute_term_name
Использование
add_filter( 'woocommerce_product_attribute_term_name', 'wp_kama_woocommerce_product_attribute_term_name_filter', 10, 2 ); /** * Function for `woocommerce_product_attribute_term_name` filter-hook. * * @param $name * @param $term * * @return */ function wp_kama_woocommerce_product_attribute_term_name_filter( $name, $term ){ // filter... return $name; }
- $name
- -
- $term
- -
Где вызывается хук
woocommerce_product_attribute_term_name
woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php 52
echo '<option value="' . esc_attr( $term->term_id ) . '"' . wc_selected( $term->term_id, $options ) . '>' . esc_html( apply_filters( 'woocommerce_product_attribute_term_name', $term->name, $term ) ) . '</option>';