Advertisement
lorro

WooCommerce - Change product tabs

Feb 16th, 2017
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  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.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement