Created
October 19, 2017 13:32
-
-
Save mehul0810/7b98468797c41d901e0116b3c8562763 to your computer and use it in GitHub Desktop.
How to Remove Existing Product Data Tabs Programmatically in WooCommerce?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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