Skip to content

Commit bb2427b

Browse files
committed
Do schema updates when viewing options page.
1 parent f10f1aa commit bb2427b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Controller.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ public static function saveOption( string $name, $value ) : void {
233233
}
234234

235235
public static function renderS3Page() : void {
236+
self::createOptionsTable();
236237
self::seedOptions();
237238

238239
$view = [];
@@ -261,7 +262,7 @@ public function deploy( string $processed_site_path, string $enabled_deployer )
261262
$s3_deployer->upload_files( $processed_site_path );
262263
}
263264

264-
public static function activate_for_single_site() : void {
265+
public static function createOptionsTable() : void {
265266
global $wpdb;
266267

267268
$table_name = $wpdb->prefix . 'wp2static_addon_s3_options';
@@ -279,7 +280,10 @@ public static function activate_for_single_site() : void {
279280

280281
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
281282
dbDelta( $sql );
283+
}
282284

285+
public static function activate_for_single_site(): void {
286+
self::createOptionsTable();
283287
self::seedOptions();
284288
}
285289

0 commit comments

Comments
 (0)