PluginProbe
Tutor LMS – eLearning and online course solution / 3.9.14
Tutor LMS – eLearning and online course solution v3.9.14
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
tutor / migrations / Migration.php
Migration.php
47 lines 698 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Migration
4 *
5 * @package Tutor
6 * @author Themeum <support@themeum.com>
7 * @link https://themeum.com
8 * @since 3.8.0
9 */
10
11 namespace Tutor\Migrations;
12
13 /**
14 * Class Migration
15 */
16 class Migration {
17 /**
18 * Constructor
19 */
20 public function __construct() {
21 $this->schedule_migrations();
22 }
23
24 /**
25 * Schedule migrations.
26 *
27 * @since 3.8.0
28 *
29 * @return void
30 */
31 public function schedule_migrations() {
32 $migrators = array(
33 QuizAttemptMigrator::instance(),
34 );
35
36 if ( tutor_utils()->has_wc() ) {
37 $migrators[] = ProcessByWcMigrator::instance();
38 }
39
40 foreach ( $migrators as $migrator ) {
41 if ( ! $migrator->is_completed() ) {
42 $migrator->schedule();
43 }
44 }
45 }
46 }
47