PluginProbe
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce / 2.2.16
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce v2.2.16
2.15.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 All 62 releases
← All changes | includes/Activator.php +18 -1 2.1.32.2.16 View file →
@@ -32,9 +32,26 @@
32 32 * @since 1.0.0
33 33 */
34 34 public static function activate()
35 35 {
36 - Upgrade::getInstance()->createTables();
36 + global $wpdb;
37 +
38 + $table = "{$wpdb->prefix}hurrytimer_evergreen";
39 + $charset_collate = $wpdb->get_charset_collate();
40 +
41 + $sql = "CREATE TABLE {$table} (
42 + id bigint(20) NOT NULL AUTO_INCREMENT,
43 + countdown_id bigint(20) unsigned NOT NULL,
44 + client_ip_address varchar(50) NOT NULL,
45 + expired tinyint(1) unsigned DEFAULT NULL,
46 + client_expires_at bigint(20) unsigned NOT NULL,
47 + destroy_at timestamp NULL DEFAULT NULL,
48 + PRIMARY KEY (id)
49 + ) {$charset_collate}";
50 +
51 + require_once ABSPATH . 'wp-admin/includes/upgrade.php';
52 +
53 + dbDelta($sql);
37 54
38 55 add_option('hurrytimer_db_version', HURRYT_DB_VERSION);
39 56 add_option(HURRYT_OPTION_VERSION_KEY, HURRYT_VERSION);
40 57