Advertisement
lorro

WooCommerce - Remove product tabs

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