diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-10-08 22:25:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 22:25:48 +0300 |
commit | 32974a696e3bd834310a74f685f0e4196aba3435 (patch) | |
tree | f7f1ce30fd7fc62b0e1fd3fd307387a6abbb8f87 | |
parent | f4bf97860238a9566b2581acfa0afd89366f09ec (diff) |
Archive ecommerce items only if Ecommerce plugin is enabled (#16549)4.0.0-b3
-rw-r--r-- | plugins/Goals/Archiver.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Goals/Archiver.php b/plugins/Goals/Archiver.php index d49d6aed68..fbb5b54e6e 100644 --- a/plugins/Goals/Archiver.php +++ b/plugins/Goals/Archiver.php @@ -13,6 +13,7 @@ use Piwik\DataAccess\LogAggregator; use Piwik\DataArray; use Piwik\DataTable; use Piwik\Metrics; +use Piwik\Plugin\Manager; use Piwik\Tracker\GoalManager; use Piwik\Plugins\VisitFrequency\API as VisitFrequencyAPI; @@ -96,7 +97,10 @@ class Archiver extends \Piwik\Plugin\Archiver public function aggregateDayReport() { $this->aggregateGeneralGoalMetrics(); - $this->aggregateEcommerceItems(); + + if (Manager::getInstance()->isPluginActivated('Ecommerce')) { + $this->aggregateEcommerceItems(); + } $this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::NEW_VISITOR_SEGMENT); $this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::RETURNING_VISITOR_SEGMENT); |