Fix statistics

[MAILPOET-2503]
This commit is contained in:
Amine Ben hammou
2020-02-03 12:19:15 +01:00
committed by Jack Kitterhing
parent 0069380da6
commit 22b9103460
3 changed files with 29 additions and 5 deletions

View File

@@ -42,7 +42,19 @@ class NewsletterWooCommerceRevenue {
/** @return string */
public function getFormattedValue() {
return $this->wooCommerceHelper->getRawPrice($this->value, ['currency' => $this->getCurrency()]);
return $this->wooCommerceHelper->getRawPrice($this->value, ['currency' => $this->currency]);
}
/**
* @return array
*/
public function asArray() {
return [
'currency' => $this->currency,
'value' => (float)$this->value,
'count' => (int)$this->ordersCount,
'formatted' => $this->getFormattedValue(),
];
}
}