From f2c47f62f8bcb5899edef233a9c5da89519aaf37 Mon Sep 17 00:00:00 2001 From: Jean-Michel Batty Date: Wed, 14 Aug 2024 11:32:07 -0500 Subject: [PATCH] Update Warranty.php changed addIsActiveFilter to addFieldToFilter because when using permissions on categories, teh addIsActiveFilter generates errors --- ViewModel/Warranty.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ViewModel/Warranty.php b/ViewModel/Warranty.php index fa0275f8..a6486a34 100644 --- a/ViewModel/Warranty.php +++ b/ViewModel/Warranty.php @@ -645,7 +645,7 @@ public function getProductInfo($product) /** @var Collection $categoryCollection */ $categoryCollection = $product->getCategoryCollection(); $categoryCollection->addAttributeToSelect('name'); - $categoryCollection->addIsActiveFilter(); + $categoryCollection->addFieldToFilter('is_active', 1); $categoryCollection->addAttributeToSort('created_at', 'desc'); $category = $categoryCollection->getFirstItem();