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 +8 -1 1.6.82.7.0 View file →
@@ -76,10 +76,16 @@
76 76 public function maybe_update() {
77 77 $current_db_version = $this->get_current_database_version();
78 78 $current_db_version = ! empty( $current_db_version ) ? $current_db_version : 0;
79 79 self::$updater = new Db_Updater();
80 - $has_new_update = false;
81 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 +
82 88 foreach ( self::$updates as $version => $update_callbacks ) {
83 89 if ( version_compare( $current_db_version, $version, '<' ) ) {
84 90 foreach ( $update_callbacks as $update_callback ) {
85 91 self::$updater->push_to_queue( [
@@ -92,8 +98,9 @@
92 98 }
93 99 }
94 100
95 101 if ( $has_new_update ) {
102 + self::$updater->gate_multisite_initial_loopback = true;
96 103 self::$updater->save()->dispatch();
97 104 }
98 105 }
99 106