diff options
author | diosmosis <benaka@piwik.pro> | 2014-11-07 05:59:11 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-11-07 05:59:11 +0300 |
commit | 2755791a3e0e62a22e405f976939e24a5cc4a46f (patch) | |
tree | 2f4c84f99336e8e10a52ac5896580d580527ab1a /plugins/Goals | |
parent | 46e81357369b935f7a747b33d0ce6851d1deddc2 (diff) |
Fixing some tests and providing better output in system test case failure.
Diffstat (limited to 'plugins/Goals')
-rw-r--r-- | plugins/Goals/API.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php index f774bee68d..36d0007f83 100644 --- a/plugins/Goals/API.php +++ b/plugins/Goals/API.php @@ -358,9 +358,11 @@ class API extends \Piwik\Plugin\API || empty($columns)) && $idGoal === GoalManager::IDGOAL_ORDER ) { - $extraProcessedMetrics = $dataTable->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); - $extraProcessedMetrics[] = new AverageOrderRevenue(); - $dataTable->setMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME, $extraProcessedMetrics); + $dataTable->filter(function (DataTable $table) { + $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); + $extraProcessedMetrics[] = new AverageOrderRevenue(); + $table->setMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME, $extraProcessedMetrics); + }); } return $dataTable; |