Title: WP_HTTP_Polling_Sync_Server::add_update
Published: May 20, 2026

---

# WP_HTTP_Polling_Sync_Server::add_update( string $room, int $client_id, string $type, string $data ): true|󠀁[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)󠁿

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Adds an update to a room’s update list via storage.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#parameters)󠁿

 `$room`stringrequired

Room identifier.

`$client_id`intrequired

Client identifier.

`$type`stringrequired

Update type (sync_step1, sync_step2, update, compaction).

`$data`stringrequired

Base64-encoded update data.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#return)󠁿

 true|[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/) True
on success, [WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
on storage failure.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#source)󠁿

[View all references](https://developer.wordpress.org/reference/files/wp-includes/collaboration/class-wp-http-polling-sync-server.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/collaboration/class-wp-http-polling-sync-server.php#L543)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_http_polling_sync_server/add_update/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_http_polling_sync_server%2Fadd_update%2F)
before being able to contribute a note or feedback.