title: Trying to get subcategory of current category
body: <p>I am trying to get subcategory of current category using <code>wp_dropdown_categories</code> .</p>
  
  <p>onclick of category, i want to get subcategory. I did try using <code>get_categories</code> function with arguments but it's not giving me subcategories. While using <code>has_children</code> is giving me blank array.</p>
  
  <p>This is my code:</p>
  
  <pre><code>add_action( 'wp_ajax_wp_get_subcategory', 'wp_get_subcategory' );
  
  function wp_get_subcategory() {
      $parent_cat_ID = $_POST['selected_category'];
  
      $args = array(
       'child_of' =&gt; $parent_cat_ID,
       'taxonomy' =&gt; 'download_category',
       'hide_empty' =&gt; 0,
       'hierarchical' =&gt; false,
       'depth'  =&gt; 1,
       'parent' =&gt; $parent_cat_ID
      );
  
      if ( isset($parent_cat_ID) ) {
          $has_children = get_categories($args);
  
          if ( $has_children ) {
  
              //wp_dropdown_categories($args);
              foreach ($has_children as $category) {
  
                  $option = '&lt;option value="'.$category-&gt;cat_ID.'"&gt;';
                  $option .= $category-&gt;cat_name;
                  echo $option .= '&lt;/option&gt;';
  
              }
          } else {
              ?&gt;&lt;select name="sub_cat_disabled" id="sub_cat_disabled" disabled="disabled"&gt;&lt;option&gt;No child categories!&lt;/option&gt;&lt;/select&gt;&lt;?php
          }
          die();    
      }
  }
  </code></pre>