Google_Sheet_Helpers::api_user_info()

The user info from API.


Return Return

(void|null|array)


Source Source

File: src/integrations/google-sheet/helpers/google-sheet-helpers.php

	public function api_user_info() {

		$client = $this->get_google_client();

		if ( empty( $client['scope'] ) ) {
			return;
		}

		$scope = $client['scope'];

		if ( ! ( strpos( $scope, self::SCOPE_USERINFO ) || strpos( $scope, self::SCOPE_USER_EMAIL ) ) ) {
			return;
		}

		$body = array(
			'action' => 'user_info',
		);

		$response = $this->api_call( $body );

		return $response;
	}