Skip to content

Commit

Permalink
Fix #1556
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybrad committed Dec 2, 2024
1 parent b888f1e commit c9b2b54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Feed Me

## Unreleased

- Fixed a PHP error that could occur if you did not have Commerce installed when running a feed. ([#1556](https://github.com/craftcms/feed-me/issues/1556))

## 6.6.0 - 2024-11-26

- Added the `assetDownloadGuzzle` config setting which defaults to `false`. When it is set to `true`, Feed Me will use Guzzle to download assets instead curl directly. ([#1549](https://github.com/craftcms/feed-me/pull/1549))
Expand Down
5 changes: 3 additions & 2 deletions src/elements/CommerceProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ public function init(): void

// After the feed has run, create a catalog pricing job to update the pricing
Event::on(Process::class, Process::EVENT_AFTER_PROCESS_FEED, function(FeedProcessEvent $event) {
$this->_runCatalogPricingJob = true;
Commerce::getInstance()->getCatalogPricing()->createCatalogPricingJob();
if (Craft::$app->getPlugins()->isPluginEnabled('commerce') && $this->_runCatalogPricingJob = true) {
Commerce::getInstance()->getCatalogPricing()->createCatalogPricingJob();
}
});
}

Expand Down

0 comments on commit c9b2b54

Please sign in to comment.