Fix reset subscriptions in SegmentsRepository
When we update subscriber segment status via executeUpdate, we have to refresh state from the DB. [MAILPOET-3551]
This commit is contained in:
@ -60,6 +60,10 @@ class SubscriberSegmentRepository extends Repository {
|
||||
'status' => SubscriberEntity::STATUS_UNSUBSCRIBED,
|
||||
'typeWordPress' => SegmentEntity::TYPE_WP_USERS,
|
||||
]);
|
||||
// Refresh SubscriberSegments status
|
||||
foreach ($subscriber->getSubscriberSegments() as $subscriberSegment) {
|
||||
$this->entityManager->refresh($subscriberSegment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user