# wp_ajax_health_check_background_updates()

URL: https://chugunov.pro/api-wordpress/functions/wp_ajax_health_check_background_updates/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 5.2.0.

> Устаревший элемент. Помечен устаревшим с версии 5.6.0.

## Сигнатура

```php
wp_ajax_health_check_background_updates()
```

## Описание

[See also](#see-also)
- [WP_REST_Site_Health_Controller::test_background_updates()](https://developer.wordpress.org/reference/classes/WP_REST_Site_Health_Controller/test_background_updates/)

## Исходный код

Файл: `wp-admin/includes/ajax-actions.php:5398`

```php
function wp_ajax_health_check_background_updates() {
	_doing_it_wrong(
		'wp_ajax_health_check_background_updates',
		sprintf(
			/* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */
			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
			'wp_ajax_health_check_background_updates',
			'WP_REST_Site_Health_Controller::test_background_updates'
		),
		'5.6.0'
	);

	check_ajax_referer( 'health-check-site-status' );

	if ( ! current_user_can( 'view_site_health_checks' ) ) {
		wp_send_json_error();
	}

	if ( ! class_exists( 'WP_Site_Health' ) ) {
		require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
	}

	$site_health = WP_Site_Health::get_instance();
	wp_send_json_success( $site_health->get_test_background_updates() );
}
```

## История изменений

- 5.6.0 — Deprecated. Use WP_REST_Site_Health_Controller::test_background_updates()
- 5.2.0 — Introduced.

## Связанные

Использует: `WP_Site_Health::get_instance`, `WP_Site_Health`, [`current_user_can`](https://chugunov.pro/api-wordpress/functions/current_user_can/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`check_ajax_referer`](https://chugunov.pro/api-wordpress/functions/check_ajax_referer/), [`_doing_it_wrong`](https://chugunov.pro/api-wordpress/functions/_doing_it_wrong/), [`wp_send_json_error`](https://chugunov.pro/api-wordpress/functions/wp_send_json_error/), [`wp_send_json_success`](https://chugunov.pro/api-wordpress/functions/wp_send_json_success/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_ajax_health_check_background_updates/
