daily pastebin goal
7%
SHARE
TWEET

WooCommerce - Remove product tabs

lorro Jul 27th, 2017 (edited) 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // WooCommerce - Remove product tabs
  3.   add_filter( 'woocommerce_product_tabs', 'custom_remove_product_tabs', 99 );
  4.   function custom_remove_product_tabs( $tabs ) {
  5.     // opinion is divided as to whether the isset check is necessary, but it doesn't hurt!
  6.     if ( isset( $tabs['description'] ) ) {
  7.       unset( $tabs['description'] ); // remove the description tab
  8.     }
  9.     if ( isset( $tabs['additional_information'] ) ) {
  10.       unset( $tabs['additional_information'] ); // remove the additional information tab
  11.     }
  12.     if ( isset( $tabs['reviews'] ) ) {
  13.       unset( $tabs['reviews'] ); // remove the reviews tab
  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