You can get a list of downloadable products in WooCommerce with a single call to wc_get_products(), setting the downloadable argument to filter your entire catalog down to just digital items.
Why Query Downloadable Products Specifically
- Useful for building a dedicated digital-products landing page
- Powers custom reports separating physical inventory from digital catalog
- Feeds into bulk operations (like re-checking file links) limited to downloadable items only
- One argument does the filtering, no manual looping required
Step 1: Query All Downloadable Product IDs
/** Get the IDs of every published downloadable product */
$downloadable_ids = wc_get_products( array(
'downloadable' => 'true',
'limit' => -1,
'status' => 'publish',
'return' => 'ids',
) );
print_r( $downloadable_ids );
Step 2: Get Full Product Objects Instead of Just IDs
/** Get full product objects for downloadable items, useful for displaying names or prices */
$downloadable_products = wc_get_products( array(
'downloadable' => 'true',
'limit' => -1,
'status' => 'publish',
) );
foreach ( $downloadable_products as $product ) {
echo $product->get_name() . ' — ' . $product->get_price_html();
}Troubleshooting
The list includes products you didn’t expect
Confirm the “downloadable” checkbox is actually unchecked on products you don’t want included — some catalogs accumulate leftover downloadable flags on products that no longer need them.
Results differ from WC_Product::is_downloadable() checks elsewhere in your code
Both should agree on the same underlying meta value, but a caching layer or an object cache serving a stale product object can cause temporary mismatches — clear object cache if results look inconsistent.
Frequently Asked Questions
Can I combine this with a category filter?
Yes, add a 'category' => array( 'your-category-slug' ) argument alongside 'downloadable' => 'true' to narrow it further.
Does this include variations with individual downloadable files?
This query targets parent products — variation-level downloadable files need to be queried through the parent variable product and its variation objects separately.
Is there a faster way for very large catalogs?
For most stores wc_get_products() performs well; extremely large catalogs (tens of thousands of products) may benefit from a direct, indexed database query instead.
Conclusion
A single filtered call is all it takes to get a list of downloadable products in WooCommerce, whether you need just the IDs or full product objects. Combine it with additional wc_get_products() arguments like category or tag to narrow the results exactly how you need.
See also How to Fix Sorry This File Type Is Not Permitted for WooCommerce Downloadable Products. Then read How to Truncate the Tag List on the WooCommerce Single Product Page.
Prefer no code? All-in-One Utilities Woo Add-on adds over 50 WooCommerce features, so you can switch them on without code.