Viewing 1 replies (of 1 total)
  • Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    This plugin is just for 10-50 categories.
    If you need it for make and model selection there is another plugin.

    If there is a great number of products try to replace the code:

    
    $args = array('orderby' => 'parent', 'order' => 'DESC', 'fields' => 'all');
        
        $ids = wc_get_products(array('return' =>'ids', 'limit' => -1));
        
        $productCategories = wp_get_object_terms($ids, $taxonomy, $args); // only get categories that have products
    
    

    with:

    
        $productCategories = get_terms($taxonomy, array('fields' => 'all', 'hide_empty' => 1, 'orderby' => 'name'));
    

    in the file:
    wp-content/plugins/product-category-dropdowns/Block/Selector.php

    Stanislav

Viewing 1 replies (of 1 total)
  • The topic ‘Useless’ is closed to new replies.