WP_Site_Health_Auto_Updates::test_wp_automatic_updates_disabled

Advertisement

Summery Summery

Check if automatic updates are disabled.

Syntax Syntax

WP_Site_Health_Auto_Updates::test_wp_automatic_updates_disabled()

Return Return

(array|bool) The test results. False if auto updates are enabled.

Source Source

File: wp-admin/includes/class-wp-site-health-auto-updates.php

	 *
	 * @since 5.3.0
	 *
	 * @return array|bool The test results. False if auto-updates are enabled.
	 */
	public function test_wp_automatic_updates_disabled() {
		if ( ! class_exists( 'WP_Automatic_Updater' ) ) {
			require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
		}

		$auto_updates = new WP_Automatic_Updater();

		if ( ! $auto_updates->is_disabled() ) {
			return false;
		}

Advertisement

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Advertisement

Leave a Reply