diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 70dc9124..e68e953a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,8 @@ == Changelog == += 6.12.21 - Oct 16, 2024 = +- Fixed issue with Single Sign On (SSO). Single Sign-On allows your customers to have a single login for both your WordPress site and your Ecwid store. If this feature is not working properly after latests release, please update your plugin. +- Internal improvements and optimizations. + = 6.12.20 - Oct 3, 2024 = - In the "Only featured products" mode, the "Store Home Page" ecommerce block was displayed incorrectly. We've fixed this. - Fixed an issue with the "Manage access to store control panel" feature where in some cases users couldn't have access to embedded store control panel. diff --git a/ecwid-shopping-cart.php b/ecwid-shopping-cart.php index de2c8d10..3429e9c3 100644 --- a/ecwid-shopping-cart.php +++ b/ecwid-shopping-cart.php @@ -5,7 +5,7 @@ Description: Ecwid by Lightspeed is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up. Text Domain: ecwid-shopping-cart Author: Ecwid Ecommerce -Version: 6.12.20 +Version: 6.12.21 Author URI: https://ecwid.to/ecwid-site License: GPLv2 or later */ diff --git a/includes/class-ecwid-admin-main-page.php b/includes/class-ecwid-admin-main-page.php index e43c572a..d07053c1 100644 --- a/includes/class-ecwid-admin-main-page.php +++ b/includes/class-ecwid-admin-main-page.php @@ -146,13 +146,21 @@ public function _do_integrated_admin_page( $page = self::PAGE_HASH_DASHBOARD ) { $result = $request->do_request( array( 'timeout' => 20 ) ); }//end if + $need_to_force_show_dashboard = false; + if ( ! empty( $result ) && $result['code'] == 403 ) { - Ecwid_Api_V3::save_token( '' ); + if ( get_option( EcwidPlatform::OPTION_ECWID_CHECK_API_RETRY_AFTER, 0 ) == 0 ) { + Ecwid_Api_V3::set_api_status( Ecwid_Api_V3::API_STATUS_ERROR_TOKEN ); + Ecwid_Api_V3::save_token( '' ); + } else { + update_option( EcwidPlatform::OPTION_ECWID_CHECK_API_RETRY_AFTER, time() + 5 * MINUTE_IN_SECONDS ); + $need_to_force_show_dashboard = true; + } } if ( empty( $result['code'] ) && empty( $result['data'] ) || $result['code'] == 500 ) { require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php'; - } elseif ( $result['code'] != 200 ) { + } elseif ( $result['code'] != 200 && ! $need_to_force_show_dashboard ) { if ( ecwid_test_oauth( true ) ) { require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php'; } else { diff --git a/readme.txt b/readme.txt index 13216cd7..466c0ea6 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Requires at least: 4.4 Tested up to: 6.6 -Stable tag: 6.12.20 +Stable tag: 6.12.21 Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available. @@ -153,6 +153,10 @@ You can use Ecwid’s built-in import tools to copy your store products from any * [Ecwid Help Center](http://help.ecwid.com "Ecwid Help") == Changelog == += 6.12.21 - Oct 16, 2024 = +- Fixed issue with Single Sign On (SSO). Single Sign-On allows your customers to have a single login for both your WordPress site and your Ecwid store. If this feature is not working properly after latests release, please update your plugin. +- Internal improvements and optimizations. + = 6.12.20 - Oct 3, 2024 = - In the "Only featured products" mode, the "Store Home Page" ecommerce block was displayed incorrectly. We've fixed this. - Fixed an issue with the "Manage access to store control panel" feature where in some cases users couldn't have access to embedded store control panel.