Remove usage of deprecated method

[MAILPOET-3267]
This commit is contained in:
Pavel Dohnal
2021-05-26 10:16:17 +02:00
committed by Veljko V
parent 6ad686588d
commit 7426479631
8 changed files with 79 additions and 71 deletions

View File

@@ -110,10 +110,7 @@ class Track {
return $data;
}
// check if the newsletter was sent to the subscriber
$queue = SendingQueue::findOne($data->queue_id); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
if (!$queue instanceof SendingQueue) return false;
return ($queue->isSubscriberProcessed($data->subscriber->getId())) ?
return ($this->sendingQueuesRepository->isSubscriberProcessed($data->queue, $data->subscriber)) ?
$data :
false;
}