Yoast\WP\SEO\MyYoast_Client\User_Interface
Management_Route::refresh_status
POST /myyoast/refresh-status — refreshes the registration status against the server.
Throttled: a successful upstream refresh suppresses further upstream calls for an hour. Within that window the call is skipped and the locally-derived status is returned unchanged, so a page reload does not hit MyYoast's rate limit. The upstream response body is never stored — only the throttle marker.
Метод класса: Management_Route{}
Хуков нет.
Возвращает
WP_REST_Response.
Использование
$Management_Route = new Management_Route(); $Management_Route->refresh_status();
Код Management_Route::refresh_status() Management Route::refresh status Yoast 28.3
public function refresh_status() {
if ( \get_transient( $this->get_refresh_throttle_key() ) !== false ) {
return $this->respond_with_connection_status( 200, null );
}
try {
$this->myyoast_client->refresh_registration_status();
} catch ( Throwable $e ) {
return $this->handle_exception( $e );
}
// Mark only on success: a failed or rate-limited attempt must not suppress the next retry.
\set_transient( $this->get_refresh_throttle_key(), 1, self::REFRESH_THROTTLE_TTL_IN_SECONDS );
return $this->respond_with_connection_status( 200, null );
}