How to Remove Product Tabs

Posted by Sachin Joshi
3
Jul 16, 2015
220 Views
Image

Hi,
If you want to remove all tabs or any particular tab for example description and reviews, then use the below code in the functions.php:


How to Remove Product Tabs

  1. add_filter( 'woocommerce_product_tabs', 'FindNerd_remove_product_items', 58 );
  2. function findnerd_remove_product_items( $items ) {
  3. unset( $items['description'] ); // To remove description item
  4. unset( $items['reviews'] ); //To remove reviews item
  5. unset( $items['additional_information'] ); //To remove additional information item
  6. return $items;
  7. }


In above code- woocommerce_product_tabs- is a predefined function, which refers to the action you are performing.

FindNerd_remove_product_items' 58- FindNerd_remove_product_items- is a built-in function, this you can rename it according to your wish and 58 is a position where your function hits to perform function.

For complete set of steps/ code, Visit full Blog: How to Remove Product Tabs

FindNerd: Being an effective C, C#, Java , PHP forum here you can also post & look for various programming queries along with their solutions including android, java, PHP questions and answers etc.

Comments
avatar
Please sign in to add comment.