Created
February 6, 2020 12:19
-
-
Save ckaklamanos/5d41b5b63f6822ea665ef642e2c5c2fe to your computer and use it in GitHub Desktop.
WooCommerce Remove Product Data Tabs (for non-Administrators)
This file contains 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 | |
function fn_remove_product_data_tabs($tabs) { | |
//unset($tabs['general']); | |
//unset($tabs['inventory']); | |
//unset($tabs['linked_product']); | |
//unset($tabs['shipping']); | |
//unset($tabs['attribute']); | |
//unset($tabs['variations']); | |
//unset($tabs['advanced']); | |
return $tabs; | |
} | |
if (!current_user_can('manage_options')) { | |
add_filter('woocommerce_product_data_tabs', 'fn_remove_product_data_tabs'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment