auth = new \ahrefs\AhrefsSeo_Vendor\Google\Auth\OAuth2( [ 'clientId' => $jsonKey['client_id'], 'clientSecret' => $jsonKey['client_secret'], 'refresh_token' => $jsonKey['refresh_token'], 'scope' => $scope, 'tokenCredentialUri' => Google_Proxy_Client::OAUTH2_TOKEN_URI, // use it instead of native self::TOKEN_CREDENTIAL_URI. ] ); } // phpcs:enable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase -- this is a copy of existing class. }