Pass revenues in stats response
[MAILPOET-3069]
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace MailPoet\Subscribers\Statistics;
|
||||
|
||||
use MailPoet\Newsletter\Statistics\WooCommerceRevenue;
|
||||
|
||||
class SubscriberStatistics {
|
||||
|
||||
/** @var int */
|
||||
@@ -13,10 +15,14 @@ class SubscriberStatistics {
|
||||
/** @var int */
|
||||
private $totalSentCount;
|
||||
|
||||
public function __construct($clickCount, $openCount, $totalSentCount) {
|
||||
/** @var WooCommerceRevenue|null */
|
||||
private $wooCommerceRevenue;
|
||||
|
||||
public function __construct($clickCount, $openCount, $totalSentCount, $wooCommerceRevenue = null) {
|
||||
$this->clickCount = $clickCount;
|
||||
$this->openCount = $openCount;
|
||||
$this->totalSentCount = $totalSentCount;
|
||||
$this->wooCommerceRevenue = $wooCommerceRevenue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,4 +45,11 @@ class SubscriberStatistics {
|
||||
public function getTotalSentCount(): int {
|
||||
return $this->totalSentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return WooCommerceRevenue|null
|
||||
*/
|
||||
public function getWooCommerceRevenue() {
|
||||
return $this->wooCommerceRevenue;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user