Astra_Theme_Background_Updater::check_if_data_migrated()

Check if database is migrated


Description


Return

(true) If the database migration should not be run through CRON.


Source

File: inc/theme-update/class-astra-theme-background-updater.php

		public function check_if_data_migrated() {

			$fallback = false;

			$is_db_version_updated = $this->is_db_version_updated();
			if ( ! $is_db_version_updated ) {

				$db_migrated = get_transient( 'astra-theme-db-migrated' );

				if ( ! $db_migrated ) {
					$db_migrated = array();
				}

				array_push( $db_migrated, $is_db_version_updated );
				set_transient( 'astra-theme-db-migrated', $db_migrated, 3600 );

				$db_migrate_count = count( $db_migrated );
				if ( $db_migrate_count >= 5 ) {
					astra_delete_option( 'is_theme_queue_running' );
					$fallback = true;
				}
			}
			return $fallback;
		}

Changelog

Changelog
Version Description
2.3.1 Introduced.


User Contributed Notes

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