This commit is contained in:
2025-07-18 15:42:57 -07:00
parent 7eb7a097e1
commit ea5a03db02

View File

@@ -34,7 +34,8 @@ class ShopPageShowCatsInsteadAction extends RadAction
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
$topLevelCats = site()->getTerm('product_cat');
$productCats = site()->getTerm('product_cat');
$topLevelCats = array_filter($productCats, fn ($c) => $c->parent == 0);
var_dump($topLevelCats);
}
}