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 +12 -2 1.2.52.7.0 View file →
@@ -37,8 +37,11 @@
37 37 ],
38 38 '1.2.3' => [ // @since 1.2.3
39 39 'add_url_query_string_column_to_contact_segmentation',
40 40 ],
41 + '1.2.7' => [ // @since 1.5.0
42 + 'add_funnel_contact_table',
43 + ],
41 44 ];
42 45
43 46 /**
44 47 * Install constructor.
@@ -73,10 +76,16 @@
73 76 public function maybe_update() {
74 77 $current_db_version = $this->get_current_database_version();
75 78 $current_db_version = ! empty( $current_db_version ) ? $current_db_version : 0;
76 79 self::$updater = new Db_Updater();
77 - $has_new_update = false;
78 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 +
79 88 foreach ( self::$updates as $version => $update_callbacks ) {
80 89 if ( version_compare( $current_db_version, $version, '<' ) ) {
81 90 foreach ( $update_callbacks as $update_callback ) {
82 91 self::$updater->push_to_queue( [
@@ -89,8 +98,9 @@
89 98 }
90 99 }
91 100
92 101 if ( $has_new_update ) {
102 + self::$updater->gate_multisite_initial_loopback = true;
93 103 self::$updater->save()->dispatch();
94 104 }
95 105 }
96 106
@@ -122,9 +132,9 @@
122 132 $sellkit_prefix = Database::DATABASE_PREFIX;
123 133
124 134 // phpcs:disable
125 135 $installed_tables = $wpdb->get_results(
126 - "SHOW TABLES from {$database_name}
136 + "SHOW TABLES from `{$database_name}`
127 137 where Tables_in_{$database_name} like '%applied_funnel%'
128 138 or Tables_in_{$database_name} like '%contact_segmentation%'
129 139 " );
130 140 // phpcs:enable