diff --git a/actions/ShopPageShowCatsInsteadAction.php b/actions/ShopPageShowCatsInsteadAction.php index 8eeb7ef..7846f3e 100644 --- a/actions/ShopPageShowCatsInsteadAction.php +++ b/actions/ShopPageShowCatsInsteadAction.php @@ -35,7 +35,8 @@ class ShopPageShowCatsInsteadAction extends RadAction remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10); $productCats = site()->getTerm('product_cat', ['url', 'thumbnail', 'title', 'count']); - $withoutUncategorized = array_filter($productCats, fn ($c) => $c->slug != "uncategorized"); + + $withoutUncategorized = array_filter($productCats, fn ($c) => !str_contains($c["url"], "uncategorized")); $topLevelCats = array_filter($withoutUncategorized, fn ($c) => $c->parent == 0); echo "