getTerm('product_cat'); $topLevelCats = array_filter($productCats, fn ($c) => $c->parent == 0); var_dump($topLevelCats); } }