Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created January 21, 2014 09:01
Show Gist options
  • Save corsonr/8536668 to your computer and use it in GitHub Desktop.
Save corsonr/8536668 to your computer and use it in GitHub Desktop.
WooCommerce - Removes all product types from product type dropdown select except "simple product"
add_filter( 'product_type_selector' , 'woo_custom_product_type_selector' );
/**
* Removes all product types from product type dropdown select
* except "simple product"
*
* @access public
* @since 1.0
* @return void
*/
function woo_custom_product_type_selector() {
$product_type_selector = array(
'simple' => __( 'Simple product', 'woocommerce' ),
);
return $product_type_selector;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment