Skip to content

Instantly share code, notes, and snippets.

@mehul0810
Created October 19, 2017 13:32
Show Gist options
  • Save mehul0810/7b98468797c41d901e0116b3c8562763 to your computer and use it in GitHub Desktop.
Save mehul0810/7b98468797c41d901e0116b3c8562763 to your computer and use it in GitHub Desktop.
How to Remove Existing Product Data Tabs Programmatically in WooCommerce?
<?php
/**
* Remove Existing Product Data Tabs from Products Detail Page
*
* @param array $tabs List of Tabs displayed on Products Detail Page.
*
* @return array $tabs
*/
function mg_woo_remove_product_tabs( $tabs ) {
// Remove the Description Tab.
unset( $tabs['description'] );
// Remove the Reviews Tab.
unset( $tabs['reviews'] );
// Remove the Additional Information Tab.
unset( $tabs['additional_information'] );
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'mg_woo_remove_product_tabs', 98 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment