daily pastebin goal
51%
SHARE
TWEET

WooCommerce - Change product tabs

lorro Feb 16th, 2017 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // WooCommerce - Change product tabs
  3.   // code goes in functions.php for your child theme
  4.   // NB the code in the WooCommerce docs fails if a tab does not exist
  5.   add_filter( 'woocommerce_product_tabs', 'custom_product_tabs', 98 );
  6.   function custom_product_tabs( $tabs ) {
  7.     if( isset($tabs['description']) ) {
  8.       $tabs['description']['title'] = __( 'Models' );
  9.       $tabs['description']['priority'] = 10;
  10.     }
  11.     if( isset($tabs['additional_information']) ) {
  12.       $tabs['additional_information']['title'] = __( 'Dimensions' );
  13.       $tabs['additional_information']['priority'] = 5;
  14.     }
  15.     return $tabs;
  16.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top