diff --git a/controllers/HelpScout_API.php b/controllers/HelpScout_API.php index 1dc96d0..40ab190 100644 --- a/controllers/HelpScout_API.php +++ b/controllers/HelpScout_API.php @@ -43,6 +43,10 @@ public static function save_oauth_token( $data = object ) { /////////// public static function maybe_refresh_token() { + //check to see if connection was made in admin before attempting to auth + if( ! HSD_Settings::get_app_id() || ! HSD_Settings::get_secret() ){ + return false; + } $auth = array( 'client_id' => HSD_Settings::get_app_id(), 'client_secret' => HSD_Settings::get_secret(),