diff --git a/mailpoet/lib/Cron/Workers/Beamer.php b/mailpoet/lib/Cron/Workers/Beamer.php index bbc555fcb6..e2fade93ba 100644 --- a/mailpoet/lib/Cron/Workers/Beamer.php +++ b/mailpoet/lib/Cron/Workers/Beamer.php @@ -24,9 +24,16 @@ class Beamer extends SimpleWorker { } public function processTaskStrategy(ScheduledTaskEntity $task, $timer) { + if (!$this->isBeamerEnabled()) { + return false; + } return $this->setLastAnnouncementDate(); } + private function isBeamerEnabled(): bool { + return $this->settings->get('3rd_party_libs.enabled') === '1'; + } + public function setLastAnnouncementDate() { $response = $this->wp->wpRemoteGet(self::API_URL . '/posts?published=true&maxResults=1', [ 'headers' => [