Yoast\WP\SEO\AI\Authentication\Application

AI_Request_Sender::grant_consent │ public │ Yoast 1.0

Records the user's consent on the AI service.

The strategy identifies the WP user to the service (the OAuth path injects user_id into the POST body), so no body is built here.

Метод класса: AI_Request_Sender{}

Хуков нет.

Возвращает

Response. The parsed response.

Использование

$AI_Request_Sender = new AI_Request_Sender();
$AI_Request_Sender->grant_consent( $user ): Response;
$user(WP_User) (обязательный)
The WP user granting consent.

Код AI_Request_Sender::grant_consent() Yoast 28.9

public function grant_consent( WP_User $user ): Response {
	return $this->send( new Request( '/user/consent', [], [], Request::METHOD_POST ), $user );
}