Yoast\WP\SEO\AI\Authentication\Application
AI_Request_Sender::revoke_consent
Revokes the user's consent on the AI service via DELETE /user/consent.
The strategy identifies the WP user to the service (the OAuth path appends the user_id query parameter to the DELETE), so no body is built here. Note the legacy Token path may provision a fresh JWT to authenticate the DELETE — Consent_Handler::revoke_consent() invalidates any locally stored JWTs afterwards, so credentials never outlive consent.
Метод класса: AI_Request_Sender{}
Хуков нет.
Возвращает
Response. The parsed response.
Использование
$AI_Request_Sender = new AI_Request_Sender(); $AI_Request_Sender->revoke_consent( $user ): Response;
- $user(WP_User) (обязательный)
- The WP user revoking consent.
Код AI_Request_Sender::revoke_consent() AI Request Sender::revoke consent Yoast 28.3
public function revoke_consent( WP_User $user ): Response {
return $this->send( new Request( '/user/consent', [], [], Request::METHOD_DELETE ), $user );
}