From 2fef3d843beeb94547b2d10900c98f6fe0d6d92f Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Sun, 16 Apr 2017 20:45:14 -0700 Subject: [PATCH] set $table_version_key on activation If fresh install of REST Cache this never gets set and maybe_table_upgrade() gives DB errors as tables are present from activation. --- wp-rest-cache.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-rest-cache.php b/wp-rest-cache.php index 1e81cf7..e366b2b 100644 --- a/wp-rest-cache.php +++ b/wp-rest-cache.php @@ -159,7 +159,8 @@ public static function activate() { require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); dbDelta( $sql ); - + update_site_option( self::$table_version_key, '3' ); + } // END public static function activate /**