Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jantzenw committed Apr 17, 2021
1 parent ba25937 commit 9f7ee0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Model/Feed/Product/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function processCategoriesForGlobal(XMLWriter $writer)
protected function processCategories(XMLWriter $writer, $defaultStore)
{
$localeStores = $this->configProvider->getLocales();
$defaultCollection = $this->getProductCollection($defaultStore);
$defaultCollection = $this->getCategoryCollection($defaultStore);

$baseUrl = $defaultStore->getBaseUrl();
$categories = [];
Expand All @@ -170,7 +170,7 @@ protected function processCategories(XMLWriter $writer, $defaultStore)
/** @var Store $localeStore */
$localeBaseUrl = $localeStore->getBaseUrl();
$localeStoreCode = $localeStore->getCode();
$localeCollection = $this->getProductCollection($localeStore);
$localeCollection = $this->getCategoryCollection($localeStore);
$localeCode = $this->configProvider->getLocale($localeStore->getId());
foreach ($localeCollection as $category) {
/** Skip categories not in main store */
Expand Down Expand Up @@ -282,7 +282,7 @@ protected function getStoreUrl($storeUrl, $urlPath, $storeCode = null, $currentU
* @return \Magento\Catalog\Model\ResourceModel\Category\Collection
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function getProductCollection($store = null)
protected function getCategoryCollection($store = null)
{
/** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */
$collection = $this->categoryFactory->create()->getCollection();
Expand Down

0 comments on commit 9f7ee0f

Please sign in to comment.