


wp-content/plugins/product-category-dropdowns/Block/Selector.php
lines 31-35

wp-content/plugins/product-category-dropdowns/view/frontend/web/main.js
line 39



Alternative solution:
add the code:

          $firstId = $parentIds[0];
          if (!isset($categoryTree[$firstId])){
            $parentCat = get_term($firstId, $taxonomy);
            $categoryTree[$firstId] = array('title' => wp_specialchars_decode($parentCat->name), 'url' => get_term_link($parentCat));
          }      
          
          continue; // we need only root categories
  
          
 before the line:
 
  foreach ($parentIds as $i => $id) {         


