Yoast\WP\SEO\MyYoast_Client\User_Interface

Management_Route::update_registration │ public │ Yoast 1.0

PUT /myyoast/registration — re-syncs the connection's redirect URIs.

Used to recover the connection after the site's URL has changed. The client resolves the current redirect URIs itself and updates the registration in place (RFC 7592 PUT) when the set differs from what is stored.

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

Хуков нет.

Возвращает

WP_REST_Response.

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

$Management_Route = new Management_Route();
$Management_Route->update_registration();

Код Management_Route::update_registration() Yoast 28.7

public function update_registration() {
	$gate = $this->require_provisioned();
	if ( $gate !== null ) {
		return $gate;
	}

	try {
		$this->myyoast_client->ensure_registered();
	} catch ( Throwable $e ) {
		return $this->handle_exception( $e );
	}

	$this->clear_refresh_throttle();

	return $this->respond_with_connection_status( 200, 'update_success' );
}