woocommerce_product_<key>_tab_title

The WooCommerce woocommerce product key tab title hook.

Description

apply_filters( 'woocommerce_product_<key>_tab_title', (unknown) $esc_html, (unknown) $key ); 

Parameters (2)

0. $esc_html (unknown) => esc_html( $tab['title'] )
The esc html.
1. $key (unknown)
The key.

Usage

To run the hook, copy the example below.
  1. $esc_html = apply_filters( 'woocommerce_product_{$key}_tab_title', $esc_html, $key ); 
  2.  
  3. if ( !empty( $esc_html ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_product_<key>_tab_title callback 
  2. function filter_woocommerce_product_key_tab_title( $esc_html, $key ) { 
  3. // make filter magic happen here... 
  4. return $esc_html
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "woocommerce_product_{$key}_tab_title", 'filter_woocommerce_product_key_tab_title', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "woocommerce_product_{$key}_tab_title", 'filter_woocommerce_product_key_tab_title', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/templates/single-product/tabs/tabs.php  
  1. <a href="#tab-<?php echo esc_attr( $key ); ?>"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); ?></a>