title: Get only all parent WooCommerce categories
body: <p>I am trying to get all the parent categories of WooCommerce, not the child. </p>
  
  <pre><code>$terms = get_terms(['taxonomy' =&gt; 'product_cat','hide_empty' =&gt; false, 'parent' =&gt; 0]);
  </code></pre>
  
  <p>But it is not working. How can I get only parent categories?</p>