From 06ccdb32acebcb1ea9796928e18cb42410937eb5 Mon Sep 17 00:00:00 2001 From: Kurtis Holsapple Date: Fri, 18 Jul 2025 15:45:09 -0700 Subject: [PATCH] changes --- actions/ShopPageShowCatsInsteadAction.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/actions/ShopPageShowCatsInsteadAction.php b/actions/ShopPageShowCatsInsteadAction.php index f1b15ab..93dbcfb 100644 --- a/actions/ShopPageShowCatsInsteadAction.php +++ b/actions/ShopPageShowCatsInsteadAction.php @@ -35,7 +35,10 @@ class ShopPageShowCatsInsteadAction extends RadAction remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10); $productCats = site()->getTerm('product_cat'); - $topLevelCats = array_filter($productCats, fn ($c) => $c->parent == 0); + $withoutUncategorized = array_filter($productCats, fn ($c) => $c->slug != "uncategorized"); + $topLevelCats = array_filter($withoutUncategorized, fn ($c) => $c->parent == 0); + + echo site()->render("shop-sub-categories", $topLevelCats); var_dump($topLevelCats); } }