HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/mobilech/alliancelaptoptraining.com.np/wp-content/plugins/tutor/migrations/Migration.php
<?php
/**
 * Migration
 *
 * @package Tutor
 * @author Themeum <support@themeum.com>
 * @link https://themeum.com
 * @since 3.8.0
 */

namespace Tutor\Migrations;

/**
 * Class Migration
 */
class Migration {
	/**
	 * Constructor
	 */
	public function __construct() {
		$this->schedule_migrations();
	}

	/**
	 * Schedule migrations.
	 *
	 * @since 3.8.0
	 *
	 * @return void
	 */
	public function schedule_migrations() {
		$migrators = array(
			QuizAttemptMigrator::instance(),
		);

		if ( tutor_utils()->has_wc() ) {
			$migrators[] = ProcessByWcMigrator::instance();
		}

		foreach ( $migrators as $migrator ) {
			if ( ! $migrator->is_completed() ) {
				$migrator->schedule();
			}
		}
	}
}