From 3a07773c857bbca130d200b966f788fa02448eee Mon Sep 17 00:00:00 2001 From: Micah Wood Date: Fri, 17 May 2024 11:50:07 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20hit=20Hiive=20if=20we=20know=20?= =?UTF-8?q?there=20is=20no=20Hiive=20connection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/NotificationsRepository.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/NotificationsRepository.php b/includes/NotificationsRepository.php index 7461073..a4645f5 100644 --- a/includes/NotificationsRepository.php +++ b/includes/NotificationsRepository.php @@ -32,6 +32,11 @@ class NotificationsRepository { */ public function __construct( $fetch_notices = true ) { + // If there is no Hiive connection, bail. + if(! HiiveConnection::is_connected()) { + return; + } + $notifications = get_transient( self::TRANSIENT ); // load test data TODO REMOVE