Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    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' => 0, 'orderby' => 'name'));
    

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

    Stanislav

    Thread Starter Shubham

    (@shubhamtiwaripage)

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to’ is closed to new replies.