PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.14
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.14
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Product.php +5 -2 4.0.63.11.14 View file →
@@ -147,13 +147,15 @@
147 147 do_action( 'themeisle_sdk_first_activation', $basefile );
148 148
149 149 update_option( $this->get_key() . '_install', time() );
150 150 }
151 - $this->install = (int) $install;
151 + $this->install = $install;
152 152 self::$cached_products[ crc32( $basefile ) ] = $this;
153 153 $current_version = get_option( $this->slug . '_version', '' );
154 154
155 - if ( $current_version !== $this->version && wp_cache_add( "{$this->slug}_version_upgrade", true, '', HOUR_IN_SECONDS ) ) {
155 + if ( $current_version !== $this->version && wp_cache_get( "{$this->slug}_version_upgrade" ) === false ) {
156 + // Set the cache lock to avoid multiple calls.
157 + wp_cache_set( "{$this->slug}_version_upgrade", true, HOUR_IN_SECONDS );
156 158 /**
157 159 * Action to be triggered when the product is updated.
158 160 *
159 161 * @param string $current_version The current version of the product.
@@ -163,8 +165,9 @@
163 165 do_action( "themeisle_sdk_update_{$this->slug}", $current_version, $this->version, $basefile );
164 166
165 167 // Update the version of the product.
166 168 update_option( "{$this->slug}_version", $this->version );
169 + // Delete the cache lock.
167 170 wp_cache_delete( "{$this->slug}_version_upgrade" );
168 171 }
169 172 }
170 173