Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ckaklamanos/55926d272c559a230af5835194b4653c to your computer and use it in GitHub Desktop.
Save ckaklamanos/55926d272c559a230af5835194b4653c to your computer and use it in GitHub Desktop.
WooCommerce - Remove "Product Type/Product Data" Dropdown Options (for non-Administrators)
<?php
function fn_woocommerce_remove_product_types( $types ){
unset( $types['grouped'] );
unset( $types['external'] );
//unset( $types['variable'] );
return $types;
}
if (!current_user_can('manage_options')) {
add_filter( 'product_type_selector', 'fn_woocommerce_remove_product_types' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment