Skip to content

Instantly share code, notes, and snippets.

@ckaklamanos
Created February 6, 2020 12:19
Show Gist options
  • Save ckaklamanos/5d41b5b63f6822ea665ef642e2c5c2fe to your computer and use it in GitHub Desktop.
Save ckaklamanos/5d41b5b63f6822ea665ef642e2c5c2fe to your computer and use it in GitHub Desktop.
WooCommerce Remove Product Data Tabs (for non-Administrators)
<?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