woocommerce_product_tabs

Product page tabs.

Description

add_filter( 'woocommerce_product_tabs', (string) $woocommerce_default_product_tabs ); 

Parameters (1)

0. $woocommerce_default_product_tabs (string) => 'woocommerce_default_product_tabs'
The woocommerce default product tabs.

Usage

To run the hook, copy the example below.
  1. $woocommerce_default_product_tabs = apply_filters( 'woocommerce_product_tabs', $woocommerce_default_product_tabs ); 
  2.  
  3. if ( !empty( $woocommerce_default_product_tabs ) ) { 
  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_tabs callback 
  2. function filter_woocommerce_product_tabs( $woocommerce_default_product_tabs ) { 
  3. // make filter magic happen here... 
  4. return $woocommerce_default_product_tabs
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_product_tabs', 'filter_woocommerce_product_tabs', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_product_tabs', 'filter_woocommerce_product_tabs', 10, 1 ); 

Defined (3)

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

/includes/wc-template-hooks.php  
  1. add_filter( 'woocommerce_product_tabs', 'woocommerce_default_product_tabs' ); 
  1. add_filter( 'woocommerce_product_tabs', 'woocommerce_sort_product_tabs', 99 ); 
/templates/single-product/tabs/tabs.php  
  1. $tabs = apply_filters( 'woocommerce_product_tabs', array() );