diff --git a/changelog.txt b/changelog.txt index 7f689b913..5e29832ab 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,7 @@ == Changelog == += 4.1.1 = +* FIX - cache issues during Data Optimization. + = 4.1.0 = * NEW - move compatibilities files from `wp_sm_sync` to `wp_stateless_files` table with extended information. * COMPATIBILITY - WooCommerce Compatibility replaced with [WP-Stateless – WooCommerce Addon](https://wordpress.org/plugins/wp-stateless-woocommerce-addon/). diff --git a/changes.md b/changes.md index 5f0b34c59..8b252a409 100644 --- a/changes.md +++ b/changes.md @@ -1,3 +1,6 @@ +#### 4.1.1 +* FIX - cache issues during Data Optimization. + #### 4.1.0 * NEW - move compatibilities files from `wp_sm_sync` to `wp_stateless_files` table with extended information. * COMPATIBILITY - WooCommerce Compatibility replaced with [WP-Stateless – WooCommerce Addon](https://wordpress.org/plugins/wp-stateless-woocommerce-addon/). diff --git a/lib/classes/batch/class-batch-task-manager.php b/lib/classes/batch/class-batch-task-manager.php index 55e8e8b4e..2f0378528 100644 --- a/lib/classes/batch/class-batch-task-manager.php +++ b/lib/classes/batch/class-batch-task-manager.php @@ -103,7 +103,13 @@ private function _get_state() { * @return int|null */ private function _get_last_updated() { - return get_option( $this->identifier . self::UPDATED_KEY, null ); + // We need to omit the cache and get the data directly from the db + global $wpdb; + + $sql = "SELECT option_value FROM $wpdb->options WHERE option_name = '%s' LIMIT 1"; + $sql = $wpdb->prepare($sql, $this->identifier . self::UPDATED_KEY); + + return $wpdb->get_var($sql); } /** diff --git a/readme.txt b/readme.txt index 79169b667..0570a2e85 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ License: GPLv2 or later Requires PHP: 8.0 Requires at least: 5.0 Tested up to: 6.6.2 -Stable tag: 4.1.0 +Stable tag: 4.1.1 Upload and serve your WordPress media files from Google Cloud Storage. @@ -129,6 +129,9 @@ Before upgrading to WP-Stateless 3.2.0, please, make sure you use PHP 7.2 or abo Before upgrading to WP-Stateless 3.0, please, make sure you tested it on your development environment. == Changelog == += 4.1.1 = +* FIX - cache issues during Data Optimization. + = 4.1.0 = * NEW - move compatibilities files from `wp_sm_sync` to `wp_stateless_files` table with extended information. * COMPATIBILITY - WooCommerce Compatibility replaced with [WP-Stateless – WooCommerce Addon](https://wordpress.org/plugins/wp-stateless-woocommerce-addon/). diff --git a/static/data/addons.php b/static/data/addons.php index b7a9c98a5..59d1b7e00 100644 --- a/static/data/addons.php +++ b/static/data/addons.php @@ -37,7 +37,7 @@ 'plugin_files' => ['elementor/elementor.php'], 'addon_file' => 'wp-stateless-elementor-addon/wp-stateless-elementor-addon.php', 'icon' => 'https://ps.w.org/elementor/assets/icon.svg', - 'repo' => 'udx/wp-stateless-elementor-addon', + 'repo' => 'udx/wp-stateless-elementor-website-builder-addon', 'wp' => 'https://wordpress.org/plugins/wp-stateless-elementor-website-builder-addon/', 'hubspot_id' => '151481399819', // 'hubspot_link' => 'https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/click?encryptedPayload=AVxigLKR8B2Z9422V%2Fh9SGpptZeq1UWUETejTC8i1C7YoBj8TRWSG2Yij36fQHaj37NIgIU0OgWeZ9SAaTb9lL%2BlPaEKwWJ1WcQNWv%2FLFWh1Y8LTEIUGRvPzShNKyv0yIC5Z3Hu6YWGYp46iXXI6nLLBfbt2fHytn3mHX7Ic3%2ByuAF3Cz2rmMusOMD3XSJGTAYobOOXuyHJzeHzztZAimflHRg%3D%3D&portalId=20504491', diff --git a/static/migrations/20240423174109.php b/static/migrations/20240423174109.php index 750ec38d1..fd20babae 100644 --- a/static/migrations/20240423174109.php +++ b/static/migrations/20240423174109.php @@ -117,7 +117,7 @@ public function process_item($item) { $media = (array) $client->get_media( $sync->file ); - if ( is_array($media) && !empty($media) ) { + if ( is_array($media) && !empty($media) && isset($media['metadata']) ) { $metadata = $media['metadata']; if ( !isset($metadata['source']) && !isset($metadata['sourceVersion']) ) { diff --git a/wp-stateless-media.php b/wp-stateless-media.php index d766a97f3..a2ca5dccb 100644 --- a/wp-stateless-media.php +++ b/wp-stateless-media.php @@ -4,7 +4,7 @@ * Plugin URI: https://stateless.udx.io/ * Description: Upload and serve your WordPress media files from Google Cloud Storage. * Author: UDX - * Version: 4.1.0 + * Version: 4.1.1 * Text Domain: stateless-media * Author URI: https://udx.io * License: GPLv2 or later