getTerm('product_cat', ['url', 'thumbnail', 'title', 'count']); $withoutUncategorized = array_filter($productCats, fn ($c) => !str_contains($c["url"], "uncategorized")); $topLevelCats = array_filter($withoutUncategorized, fn ($c) => $c->parent == 0); echo "