This commit is contained in:
2025-07-18 15:49:47 -07:00
parent b18eb5beb5
commit c8326c0790

View File

@@ -34,7 +34,7 @@ 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);
$productCats = site()->getTerm('product_cat');
$productCats = site()->getTerm('product_cat', ['url', 'thumbnail', 'title', 'count']);
$withoutUncategorized = array_filter($productCats, fn ($c) => $c->slug != "uncategorized");
$topLevelCats = array_filter($withoutUncategorized, fn ($c) => $c->parent == 0);