mirror of
https://github.com/10h30/wp-strava.git
synced 2026-06-05 15:10:01 +09:00
Simplify retry
This commit is contained in:
@@ -177,11 +177,8 @@ class WPStrava_API {
|
||||
$auth = WPStrava::get_instance()->auth;
|
||||
if ( $auth instanceof WPStrava_AuthRefresh ) {
|
||||
$auth->auth_refresh();
|
||||
$access_token = $this->get_access_token();
|
||||
if ( $access_token ) {
|
||||
$get_args['headers']['Authorization'] = 'Bearer ' . $access_token;
|
||||
}
|
||||
return $this->remote_get( $uri, $get_args );
|
||||
// Try again.
|
||||
return $this->remote_get( $uri, $args );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user