Hide option select item in woocommerce product type Hide option select item in woocommerce product type wordpress wordpress

Hide option select item in woocommerce product type


You can filter product_type_selector

add_filter( 'product_type_selector', 'remove_product_types' );function remove_product_types( $types ){    unset( $types['grouped'] );    unset( $types['external'] );    return $types;}


Try this. This code should work and it work best with woocommerce 3.4.4 and above.Refrence:https://gist.github.com/tanmay27vats/89f9d67db78c33a6ffa1d844235a5db1

add_filter( 'product_type_selector', 'remove_product_types' );function remove_product_types( $types ){    unset( $types['grouped'] );    unset( $types['external'] );    unset( $types['variable'] );    return $types;}


You can use named selectors:

#product-type option[value="grouped"] {    ... your css here ...}

See this post: CSS to select another Element based on a HTML Select Option Value