Disable Virtual and Downloadable Products
Sometimes clients are looking for a solution to completely disable downloadable (and virtual) products functionality. And in this tutorial I will show you how exactly you can do it and even without using WordPress plugins.
There are 4 steps:
- Remove downloads endpoint.
- Remove checkboxes from the admin edit product pages.
- Remove dropdown options from Product Type Filter.
- Remove downloadable product permissions meta box from edit order pages.
I will describe every step in details.
1. Remove Download Endpoint
First things first, let’s remove “Downloads” page from customer accounts.

I have an additional tutorial about that by the way, but there is no needs to read it now, just go to WooCommerce Settings, Advanced tab and then remove “Downloads” endpoint.

That’s it! “Downloads” tab won’t be available in My Account area anymore.
2. Remove Virtual and Downloadable Checkboxes from the Product Data Metabox
I always configure /wp-admin/
area personally for all of my clients, so first of all I remove any unnecessary functionality. For example if clients are going to sell only physical goods, they do not need the checkboxes Virtual and Downloadable that you can see on the screenshot below:

I think it is worth mentioning, that when I configured the WooCommerce installation, I selected the option, which says that I’m going to sell only physical goods, but as you can see it doesn’t affect these checkboxes.
But product_type_options
filter hook can help.
add_filter( 'product_type_options', function( $options ) {
// remove "Virtual" checkbox
if( isset( $options[ 'virtual' ] ) ) {
unset( $options[ 'virtual' ] );
}
// remove "Downloadable" checkbox
if( isset( $options[ 'downloadable' ] ) ) {
unset( $options[ 'downloadable' ] );
}
return $options;
} );
Inserting this code to your theme functions.php
file does the trick 🎉

Do not ignore the conditions on lines 3
and 9
, because if checkboxes are already removed in another place in code (maybe in some plugin), you will get PHP notices.
And the last small touches in case you are a perfectionist. Do you see a separator after the product type selection? Let’s remove it too.

It can be done with a couple lines of CSS code and it is the only way:
#woocommerce-product-data .hndle label:first-child{
border-right: 0;
}
You can insert the CSS either with the admin_head
hook or directly in a CSS file which you use in admin area.
3. Remove Downloadable and Virtual Dropdown Options from Product Type Filter
If you go to All Products page, there could be some filters, one of them is by product type:

As you may notice, what we did with product_type_options
before doesn’t affect this dropdown.
Luckily there is a hook too, but it is kind of tricky.
<?php
add_filter( 'woocommerce_products_admin_list_table_filters', function( $filters ) {
if( isset( $filters[ 'product_type' ] ) ) {
$filters[ 'product_type' ] = 'misha_product_type_callback';
}
return $filters;
});
function misha_product_type_callback(){
$current_type = isset( $_REQUEST[ 'product_type' ] ) ? wc_clean( wp_unslash( $_REQUEST[ 'product_type' ] ) ) : false;
?>
<select name="product_type" id="dropdown_product_type">
<option value="">Filter by product type</option>
<?php foreach( wc_get_product_types() as $value => $label ) : ?>
<option value="<?php echo esc_attr( $value ) ?>" <?php selected( $value, $current_type ) ?>>
<?php echo esc_html( $label ) ?>
</option>
<?php endforeach; ?>
</select>
<?php
}
Let me explain how it works:
- Filter hook
woocommerce_products_admin_list_table_filters
allows to redefine callback functions which are used forproduct_type
,product_category
andstock_status
filters. With this hook it is also possible to remove a certain filter, usingunset()
. - Function
misha_product_type_callback()
is just our callback function which renders the filter, I copied it from the originalrender_products_type_filter()
, with just removing the code which displays Downloadable and Virtual options.

4. Remove Meta Box from Order
The last but not least is to remove metabox “Downloadable product permissions” from edit order pages.
This one:

This is how to remove it:
add_action( 'add_meta_boxes', 'misha_remove_downloads_meta_box', 999 );
function misha_remove_downloads_meta_box(){
remove_meta_box( 'woocommerce-order-downloads', 'shop_order', 'normal' );
}

Misha Rudrastyh
Hey guys and welcome to my website. For more than 10 years I've been doing my best to share with you some superb WordPress guides and tips for free.
Need some developer help? Contact me
Hello Misha,
First code “Remove Virtual and Downloadable Checkboxes from the Product Data Metabox” worked fine.
But second “How to Remove Downloadable and Virtual Dropdown Options from Product Type Filter” has no impact on my installation. Could it be related to a WC v3.2.6?
I have no needs for virtual & downloadable products in my shop so I would like to entirely remove this as an option. Another place this show up is in order administration page where shop manager can regenerate download (top right dropdown action menu).
Any help on this topic?
Hi Bojan,
Not sure about your WooCommerce version, but on my 3.6.5 works perfectly 🙃
Could you please also clarify where the 3rd place is?
Good day Misha.
First, thanks for this great tutorial. I am new to WordPress and I want to make quite a few changes to remove those things that aren’t being used to reduce any confusion and really focus on what is important for my site.
That all being said, can you tell me how you found these hooks and filters? Is there a resource online, or are you using DevTools, and if so, how?
Another area I need to make adjustments is the “Product Data” dropdown that lets you choose the type of product, I want to remove unnecessary options so I’m looking for some code for that specifically, but I still have so many other areas to adjust as well.
Thank you in advance.
Good day James,
Usually I just explore WooCommerce files to find the hooks I need. But sometimes you can google it.
Here is how to remove unnecessary types.