Remove Product Data Tabs for Single Products

Short instruction on how easily remove the unnecessary data tabs for the WooCommerce single product

Sometimes our customers need to remove the unused data tabs for the single product for WooCommerce plugin.

Below you may find the instruction on how it can be achieved.

  • Access your theme files any convenient way (CPanel or any FTP-client).
  • Find the file: \wp-content\themes\native\functions.php
  • Open it in a text editor.
  • Find the following lines in this file:
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );

function woo_remove_product_tabs( $tabs ) {

unset( $tabs['description'] ); 
unset( $tabs['reviews'] ); 
unset( $tabs['additional_information'] ); 

return $tabs;

}


  • Comment the following lines.
//unset( $tabs['description'] ); 
//unset( $tabs['reviews'] ); 
//unset( $tabs['additional_information'] );
  • So as the result you’ll get the following lines.
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );

function woo_remove_product_tabs( $tabs ) {

//unset( $tabs['description'] ); 
//unset( $tabs['reviews'] ); 
//unset( $tabs['additional_information'] ); 

return $tabs;

}


  • Save the modifications done.

 

Regards, DFD Support Team

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(https://rnbtheme.com/documentation/wp-content/uploads/2017/01/hands1.jpg);background-size: cover;background-position: center center;background-attachment: scroll;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 550px;}#main-content .dfd-content-wrap {margin: 0px;} #main-content .dfd-content-wrap > article {padding: 0px;}@media only screen and (min-width: 1101px) {#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars {padding: 0 0px;}#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars > #main-content > .dfd-content-wrap:first-child,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars > #main-content > .dfd-content-wrap:first-child {border-top: 0px solid transparent; border-bottom: 0px solid transparent;}#layout.dfd-portfolio-loop > .row.full-width #right-sidebar,#layout.dfd-gallery-loop > .row.full-width #right-sidebar {padding-top: 0px;padding-bottom: 0px;}#layout.dfd-portfolio-loop > .row.full-width > .blog-section.no-sidebars .sort-panel,#layout.dfd-gallery-loop > .row.full-width > .blog-section.no-sidebars .sort-panel {margin-left: -0px;margin-right: -0px;}}#layout .dfd-content-wrap.layout-side-image,#layout > .row.full-width .dfd-content-wrap.layout-side-image {margin-left: 0;margin-right: 0;}