Search code examples
wordpresswoocommercedropdown

Category List changed into type and filter


I am not sure if this is a woocommerce or a wordpress behaviour (I can't find anything about this). But it seems when the number of product categories become a lot, the backend admin dropdown changes into a type and filter box. I'd like to keep this as a dropdown menu. Is there any information, hook about this?

Normal Situation

After unknown threshold number of categories


Solution

  • It is a WooCommerce behaviour and can be modified with this filter woocommerce_product_category_filter_threshold which defaults to 100.

    You can use it like so

    add_filter('woocommerce_product_category_filter_threshold', 'return500');
    
    function return500(){
        return 500;
    }
    

    The following also works for unlimited

    add_filter('woocommerce_product_category_filter_threshold', '__return_true');