PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
← All changes | includes/core/install.php +15 -2 1.2.12.7.0 View file →
@@ -34,8 +34,14 @@
34 34 ],
35 35 '1.2.1' => [
36 36 'add_ip_column_to_contact_segmentation',
37 37 ],
38 + '1.2.3' => [ // @since 1.2.3
39 + 'add_url_query_string_column_to_contact_segmentation',
40 + ],
41 + '1.2.7' => [ // @since 1.5.0
42 + 'add_funnel_contact_table',
43 + ],
38 44 ];
39 45
40 46 /**
41 47 * Install constructor.
@@ -70,10 +76,16 @@
70 76 public function maybe_update() {
71 77 $current_db_version = $this->get_current_database_version();
72 78 $current_db_version = ! empty( $current_db_version ) ? $current_db_version : 0;
73 79 self::$updater = new Db_Updater();
74 - $has_new_update = false;
75 80
81 + // Avoid stacking duplicate batches (e.g. admin refreshes) or colliding with an in-flight run.
82 + if ( self::$updater->has_pending_migrations() ) {
83 + return;
84 + }
85 +
86 + $has_new_update = false;
87 +
76 88 foreach ( self::$updates as $version => $update_callbacks ) {
77 89 if ( version_compare( $current_db_version, $version, '<' ) ) {
78 90 foreach ( $update_callbacks as $update_callback ) {
79 91 self::$updater->push_to_queue( [
@@ -86,8 +98,9 @@
86 98 }
87 99 }
88 100
89 101 if ( $has_new_update ) {
102 + self::$updater->gate_multisite_initial_loopback = true;
90 103 self::$updater->save()->dispatch();
91 104 }
92 105 }
93 106
@@ -119,9 +132,9 @@
119 132 $sellkit_prefix = Database::DATABASE_PREFIX;
120 133
121 134 // phpcs:disable
122 135 $installed_tables = $wpdb->get_results(
123 - "SHOW TABLES from {$database_name}
136 + "SHOW TABLES from `{$database_name}`
124 137 where Tables_in_{$database_name} like '%applied_funnel%'
125 138 or Tables_in_{$database_name} like '%contact_segmentation%'
126 139 " );
127 140 // phpcs:enable