Skip to content

Instantly share code, notes, and snippets.

@bulentsakarya
Created December 10, 2019 09:48
Show Gist options
  • Save bulentsakarya/fd21998051db1ebaa8e5d2e4c4386f30 to your computer and use it in GitHub Desktop.
Save bulentsakarya/fd21998051db1ebaa8e5d2e4c4386f30 to your computer and use it in GitHub Desktop.
WooCommerce remove product types.
/**
* @snippet Customize Product Types
*/
function remove_product_types( $types ){
//unset( $types['simple'] );
//unset( $types['grouped'] );
//unset( $types['external'] );
//unset( $types['variable'] );
return $types;
}
add_filter( 'product_type_selector', 'remove_product_types' );
/** Remove the lines in front of the type of product you want to use */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment