Title: wp_get_auto_update_message
Published: August 11, 2020
Last modified: February 24, 2026

---

# wp_get_auto_update_message(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#changelog)

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

Determines the appropriate auto-update message to be displayed.

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

 string The update message to be shown.

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

    ```php
    function wp_get_auto_update_message() {
    	$next_update_time = wp_next_scheduled( 'wp_version_check' );

    	// Check if the event exists.
    	if ( false === $next_update_time ) {
    		$message = __( 'Automatic update not scheduled. There may be a problem with WP-Cron.' );
    	} else {
    		$time_to_next_update = human_time_diff( (int) $next_update_time );

    		// See if cron is overdue.
    		$overdue = ( time() - $next_update_time ) > 0;

    		if ( $overdue ) {
    			$message = sprintf(
    				/* translators: %s: Duration that WP-Cron has been overdue. */
    				__( 'Automatic update overdue by %s. There may be a problem with WP-Cron.' ),
    				$time_to_next_update
    			);
    		} else {
    			$message = sprintf(
    				/* translators: %s: Time until the next update. */
    				__( 'Automatic update scheduled in %s.' ),
    				$time_to_next_update
    			);
    		}
    	}

    	return $message;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/update.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/update.php#L1099)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/update.php#L1099-L1127)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_next_scheduled()](https://developer.wordpress.org/reference/functions/wp_next_scheduled/)`wp-includes/cron.php` |

Retrieves the timestamp of the next scheduled event for the given hook.

  | 
| [human_time_diff()](https://developer.wordpress.org/reference/functions/human_time_diff/)`wp-includes/formatting.php` |

Determines the difference between two timestamps.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#)

| Used by | Description | 
| [core_auto_updates_settings()](https://developer.wordpress.org/reference/functions/core_auto_updates_settings/)`wp-admin/update-core.php` |

Display WordPress auto-updates settings.

  | 
| [WP_MS_Themes_List_Table::column_autoupdates()](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/column_autoupdates/)`wp-admin/includes/class-wp-ms-themes-list-table.php` |

Handles the auto-updates column output.

  | 
| [wp_theme_auto_update_setting_template()](https://developer.wordpress.org/reference/functions/wp_theme_auto_update_setting_template/)`wp-admin/themes.php` |

Returns the JavaScript template used to display the auto-update setting for a theme.

  | 
| [WP_Plugins_List_Table::single_row()](https://developer.wordpress.org/reference/classes/wp_plugins_list_table/single_row/)`wp-admin/includes/class-wp-plugins-list-table.php` |  | 
| [list_plugin_updates()](https://developer.wordpress.org/reference/functions/list_plugin_updates/)`wp-admin/update-core.php` |

Display the upgrade plugins form.

  | 
| [list_theme_updates()](https://developer.wordpress.org/reference/functions/list_theme_updates/)`wp-admin/update-core.php` |

Display the upgrade themes form.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_get_auto_update_message/?output_format=md#)

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

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

## User Contributed Notes

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