Determine if an auto-update is possible from the specified DB version

Description Description

Auto updating is possible as long as none of the required updates are marked as "manual".

Top ↑

Return Return

(boolean) Returns true when an auto-update is possible and false if manual updating is required.

Top ↑

Source Source

File: includes/class-llms-db-ugrader.php

	public function can_auto_update() {

		$autoupdate = true;

		foreach ( $this->get_required_updates( $this->db_version ) as $update ) {

			// If we find a manual update we cannot auto-update.
			if ( 'manual' === $update['type'] ) {
				$autoupdate = false;

		 * Filters the list of database updates.
		 * @since 5.2.0
		 * @param boolean          $autoupdate Whether or not an automatic update can be run.
		 * @param string           $db_version The specified DB that's being upgraded from.
		 * @param LLMS_DB_Upgrader $upgrader   Instance of the database upgrader.
		return apply_filters( 'llms_can_auto_update_db', $autoupdate, $this->db_version, $this );


Top ↑

Changelog Changelog

Version Description
5.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.