From 610df52dd689f8cc20ab73898c0983b655049b1c Mon Sep 17 00:00:00 2001 From: meteor Date: Fri, 21 Jun 2024 18:01:13 +0400 Subject: [PATCH] PLUGINS-6905 --- ecwid-shopping-cart.php | 2 +- includes/class-ecwid-static-page.php | 8 ++--- .../class-ecwid-shortcode-productbrowser.php | 32 ++++++++----------- js/frontend.js | 2 +- 4 files changed, 19 insertions(+), 25 deletions(-) diff --git a/ecwid-shopping-cart.php b/ecwid-shopping-cart.php index 41a803a1..b3b792d1 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.13 +Version: 6.12.14 Author URI: https://ecwid.to/ecwid-site License: GPLv2 or later */ diff --git a/includes/class-ecwid-static-page.php b/includes/class-ecwid-static-page.php index d1e8656b..f3abf509 100644 --- a/includes/class-ecwid-static-page.php +++ b/includes/class-ecwid-static-page.php @@ -174,12 +174,11 @@ protected static function maybe_fetch_data() { $cached_data = EcwidPlatform::get_from_static_pages_cache( $url ); if ( $cached_data ) { $is_css_defined = ! empty( $dynamic_css ); - $is_css_already_set = ! empty( $cached_data->isSetDynamicCss ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + $is_css_already_set = in_array( $dynamic_css, $cached_data->cssFiles, true ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $is_home_page = Ecwid_Store_Page::is_store_home_page(); if ( $is_home_page && $is_css_defined && ! $is_css_already_set ) { - $cached_data->cssFiles = array( $dynamic_css ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - $cached_data->isSetDynamicCss = true; //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + $cached_data->cssFiles = array( $dynamic_css ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase EcwidPlatform::store_in_static_pages_cache( $url, $cached_data ); } @@ -213,8 +212,7 @@ protected static function get_static_snapshot( $url, $dynamic_css = '' ) { //phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase if ( ! empty( $dynamic_css ) ) { - $fetched_data->cssFiles = array( $dynamic_css ); - $fetched_data->isSetDynamicCss = true; + $fetched_data->cssFiles = array( $dynamic_css ); } if ( ! empty( $fetched_data->htmlCode ) ) { diff --git a/includes/shortcodes/class-ecwid-shortcode-productbrowser.php b/includes/shortcodes/class-ecwid-shortcode-productbrowser.php index 0d0ecbb7..000d84f0 100644 --- a/includes/shortcodes/class-ecwid-shortcode-productbrowser.php +++ b/includes/shortcodes/class-ecwid-shortcode-productbrowser.php @@ -92,25 +92,21 @@ protected function get_dynamic_html_code( $is_default_render = true, $classname } protected function get_js_for_adding_html_id() { - global $ecwid_current_theme; - if ( $ecwid_current_theme ) { - ob_start(); - ?> - - - - + +