Order emails by order in automation

[MAILPOET-5092]
This commit is contained in:
David Remer
2023-06-22 15:47:06 +03:00
committed by Aschepikov
parent 53f58fd1a4
commit 43a540c03c

View File

@ -103,6 +103,10 @@ class OverviewStatisticsController {
$data['emails'][$newsletterId]['revenue']['previous'] = $statistic->getWooCommerceRevenue() ? $statistic->getWooCommerceRevenue()->getValue() : 0;
}
usort($data['emails'], function ($a, $b) {
return $a['order'] <=> $b['order'];
});
return $data;
}