diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index d77ec3a5c3a..259399ece82 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -567,8 +567,7 @@ private function getProductsCountFromCategoryTable(Category $item, string $websi */ private function getProductsCountQuery(array $categoryIds, $addVisibilityFilter = true): Select { - $connections = $this->_resource->getConnection(); - $categoryTable = $connections->getTableName('catalog_category_product_index'); + $categoryTable = $this->_resource->getTableName('catalog_category_product_index'); $select = $this->_conn->select() ->from( ['cat_index' => $categoryTable],