Instantly share code, notes, and snippets.

What would you like to do?
Change WooCommerce category dropdown to static list: If you don't like the empty 'Filter by category' dropdown then you can get the regular dropdown back.
Plugin Name: WooCommerce Category Dropdown in Products
Plugin URI:
Description: Set the category dropdown to a static one in Products admin listing.
Author: Damien Carbery
Version: 0.1
add_filter( 'woocommerce_product_category_filter_threshold', 'dcwd_categories_dropdown' );
function dcwd_categories_dropdown( $dropdown_cutoff ) {
return PHP_INT_MAX; // Ensure that the threshold is never reached.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment