Limit legacy segment subscriber count to subscribed subscribers

[MAILPOET-3077]
This commit is contained in:
Rostislav Wolny
2020-09-24 11:26:45 +02:00
committed by Veljko V
parent b37d1f8c03
commit cdc090fc15
2 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class SubscribersCount {
foreach ($dynamicSegment->getFilters() as $filter) {
$orm = $filter->toSql($orm);
}
$orm->where(MP_SUBSCRIBERS_TABLE . '.status', Subscriber::STATUS_SUBSCRIBED);
return $orm->findOne()->cnt;
}
}