Skip to content

Commit

Permalink
Don’t hit Hiive if we know there is no Hiive connection
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed May 17, 2024
1 parent 1bdd192 commit 3a07773
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/NotificationsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a07773

Please sign in to comment.