| @@ -58,11 +58,19 @@ | ||
| 58 | 58 | */ |
| 59 | 59 | private static function register_tables(): void { |
| 60 | 60 | self::load_dependencies(); |
| 61 | 61 | |
| 62 | + if ( ! class_exists( 'ActionScheduler_HybridStore' ) ) { | |
| 63 | + return; | |
| 64 | + } | |
| 65 | + | |
| 62 | 66 | $store = new ActionScheduler_HybridStore(); |
| 63 | 67 | add_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10, 2 ); |
| 64 | 68 | |
| 69 | + if ( ! class_exists( 'ActionScheduler_StoreSchema' ) || ! class_exists( 'ActionScheduler_LoggerSchema' ) ) { | |
| 70 | + return; | |
| 71 | + } | |
| 72 | + | |
| 65 | 73 | $store_schema = new ActionScheduler_StoreSchema(); |
| 66 | 74 | $logger_schema = new ActionScheduler_LoggerSchema(); |
| 67 | 75 | |
| 68 | 76 | $store_schema->register_tables( true ); |
| @@ -77,8 +85,12 @@ | ||
| 77 | 85 | * @return bool |
| 78 | 86 | */ |
| 79 | 87 | private static function tables_exist(): bool { |
| 80 | 88 | self::load_dependencies(); |
| 89 | + | |
| 90 | + if ( ! class_exists( 'ActionScheduler_StoreSchema' ) ) { | |
| 91 | + return false; | |
| 92 | + } | |
| 81 | 93 | |
| 82 | 94 | $store_schema = new ActionScheduler_StoreSchema(); |
| 83 | 95 | return $store_schema->tables_exist(); |
| 84 | 96 | } |