Plugin Directory

Changeset 3059103


Ignore:
Timestamp:
03/26/2024 01:11:00 PM (2 years ago)
Author:
Ecwid
Message:

v 6.12.12 files

Location:
ecwid-shopping-cart
Files:
3 deleted
7 edited
180 copied

Legend:

Unmodified
Added
Removed
  • ecwid-shopping-cart/tags/6.12.12/ecwid-shopping-cart.php

    r3055878 r3059103  
    66Text Domain: ecwid-shopping-cart
    77Author: Ecwid Ecommerce
    8 Version: 6.12.11
     8Version: 6.12.12
    99Author URI: https://ecwid.to/ecwid-site
    1010License: GPLv2 or later
  • ecwid-shopping-cart/tags/6.12.12/includes/class-ecwid-html-meta.php

    r2884108 r3059103  
    125125
    126126        if ( ecwid_is_applicable_escaped_fragment() || Ecwid_Seo_Links::is_product_browser_url() ) {
    127 
    128127            $description_html = Ecwid_Static_Page::get_meta_description_html();
    129 
    130128        } elseif ( Ecwid_Store_Page::is_store_page() ) {
    131129            $set_metadesc = false;
     
    135133                $store_page_params = Ecwid_Store_Page::get_store_page_params();
    136134                if ( isset( $store_page_params['default_category_id'] ) && $store_page_params['default_category_id'] > 0 ) {
    137 
    138135                    $description_html = Ecwid_Static_Page::get_meta_description_html();
    139 
    140136                } else {
    141137                    $api     = new Ecwid_Api_V3();
     
    143139
    144140                    if ( ! empty( $profile->settings->storeDescription ) ) {
    145 
    146141                        $description = $profile->settings->storeDescription;
    147142                        $description = Ecwid_HTML_Meta::process_raw_description( $description, ECWID_TRIMMED_DESCRIPTION_LENGTH );
  • ecwid-shopping-cart/tags/6.12.12/includes/class-ecwid-static-page.php

    r2884108 r3059103  
    174174        $cached_data = EcwidPlatform::get_from_static_pages_cache( $url );
    175175        if ( $cached_data ) {
    176 
    177176            $is_css_defined     = ! empty( $dynamic_css );
    178177            $is_css_already_set = ! empty( $cached_data->isSetDynamicCss ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
     
    180179
    181180            if ( $is_home_page && $is_css_defined && ! $is_css_already_set ) {
    182 
    183181                $cached_data->cssFiles        = array( $dynamic_css ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    184182                $cached_data->isSetDynamicCss = true; //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
     
    258256    }
    259257
     258    public static function preparing_css_url( $url ) {
     259        $replace_pairs = array(
     260            '#'  => '%23',
     261            ','  => '%2C',
     262            ' '  => '%20',
     263            '"'  => '%22',
     264            '\\' => '',
     265        );
     266
     267        return strtr( $url, $replace_pairs );
     268    }
     269
    260270    public static function get_css_files() {
    261         return self::get_data_field( 'cssFiles' );
     271        $css_files = self::get_data_field( 'cssFiles' );
     272
     273        if ( ! empty( $css_files ) ) {
     274            $css_files = array_map( 'Ecwid_Static_Page::preparing_css_url', $css_files );
     275        }
     276
     277        return $css_files;
    262278    }
    263279
  • ecwid-shopping-cart/tags/6.12.12/includes/shortcodes/class-ecwid-shortcode-productbrowser.php

    r3055878 r3059103  
    210210    protected function _process_params( $shortcode_params = array() ) {
    211211
    212         $shortcode_params = array_map( 'esc_attr', $shortcode_params );
     212        if ( ! empty( $shortcode_params ) && is_array( $shortcode_params ) ) {
     213            $shortcode_params = array_map( 'esc_attr', $shortcode_params );
     214        }
    213215
    214216        $atts = shortcode_atts(
     
    316318                : get_option( 'ecwid_default_category_id' );
    317319
     320        $ecwid_default_category_id = absint( $ecwid_default_category_id );
     321
    318322        return $ecwid_default_category_id;
    319323    }
  • ecwid-shopping-cart/tags/6.12.12/lib/ecwid_api_v3.php

    r3010593 r3059103  
    574574        }
    575575
    576         $params = array();
     576        $params = array(
     577            'responseFields' => 'generalInfo,account,settings,payment(applePay),featureToggles,formatsAndUnits(currency,currencyPrefix,currencySuffix),designSettings',
     578        );
    577579
    578580        $options = $this->build_request_headers();
  • ecwid-shopping-cart/tags/6.12.12/readme.txt

    r3055891 r3059103  
    152152
    153153== Changelog ==
     154= 6.12.12 - Mar 27, 2024 =
     155- Fixed a PHP error that could occur when adding a storefront via a shortcode without any parameters.
     156- Minor fixes and improvements.
     157
    154158= 6.12.11 - Mar 21, 2024 =
    155159- WordPress 6.5 compatibility. The new WordPress version will be released soon. The Ecwid ecommerce shopping cart plugin is ready for the new release — everything works well in your WordPress admin and storefront pages. Feel free to upgrade your site to WordPress 6.5.
  • ecwid-shopping-cart/tags/6.12.12/templates/debug.php

    r2770539 r3059103  
    8484    </div>
    8585</div>
     86
    8687<h2>Options</h2>
    87 
    8888<div>
    8989<?php foreach ( $all_options as $key => $option ) : ?>
  • ecwid-shopping-cart/trunk/ecwid-shopping-cart.php

    r3055878 r3059103  
    66Text Domain: ecwid-shopping-cart
    77Author: Ecwid Ecommerce
    8 Version: 6.12.11
     8Version: 6.12.12
    99Author URI: https://ecwid.to/ecwid-site
    1010License: GPLv2 or later
  • ecwid-shopping-cart/trunk/includes/class-ecwid-html-meta.php

    r2884108 r3059103  
    125125
    126126        if ( ecwid_is_applicable_escaped_fragment() || Ecwid_Seo_Links::is_product_browser_url() ) {
    127 
    128127            $description_html = Ecwid_Static_Page::get_meta_description_html();
    129 
    130128        } elseif ( Ecwid_Store_Page::is_store_page() ) {
    131129            $set_metadesc = false;
     
    135133                $store_page_params = Ecwid_Store_Page::get_store_page_params();
    136134                if ( isset( $store_page_params['default_category_id'] ) && $store_page_params['default_category_id'] > 0 ) {
    137 
    138135                    $description_html = Ecwid_Static_Page::get_meta_description_html();
    139 
    140136                } else {
    141137                    $api     = new Ecwid_Api_V3();
     
    143139
    144140                    if ( ! empty( $profile->settings->storeDescription ) ) {
    145 
    146141                        $description = $profile->settings->storeDescription;
    147142                        $description = Ecwid_HTML_Meta::process_raw_description( $description, ECWID_TRIMMED_DESCRIPTION_LENGTH );
  • ecwid-shopping-cart/trunk/includes/class-ecwid-static-page.php

    r2884108 r3059103  
    174174        $cached_data = EcwidPlatform::get_from_static_pages_cache( $url );
    175175        if ( $cached_data ) {
    176 
    177176            $is_css_defined     = ! empty( $dynamic_css );
    178177            $is_css_already_set = ! empty( $cached_data->isSetDynamicCss ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
     
    180179
    181180            if ( $is_home_page && $is_css_defined && ! $is_css_already_set ) {
    182 
    183181                $cached_data->cssFiles        = array( $dynamic_css ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    184182                $cached_data->isSetDynamicCss = true; //phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
     
    258256    }
    259257
     258    public static function preparing_css_url( $url ) {
     259        $replace_pairs = array(
     260            '#'  => '%23',
     261            ','  => '%2C',
     262            ' '  => '%20',
     263            '"'  => '%22',
     264            '\\' => '',
     265        );
     266
     267        return strtr( $url, $replace_pairs );
     268    }
     269
    260270    public static function get_css_files() {
    261         return self::get_data_field( 'cssFiles' );
     271        $css_files = self::get_data_field( 'cssFiles' );
     272
     273        if ( ! empty( $css_files ) ) {
     274            $css_files = array_map( 'Ecwid_Static_Page::preparing_css_url', $css_files );
     275        }
     276
     277        return $css_files;
    262278    }
    263279
  • ecwid-shopping-cart/trunk/includes/shortcodes/class-ecwid-shortcode-productbrowser.php

    r3055878 r3059103  
    210210    protected function _process_params( $shortcode_params = array() ) {
    211211
    212         $shortcode_params = array_map( 'esc_attr', $shortcode_params );
     212        if ( ! empty( $shortcode_params ) && is_array( $shortcode_params ) ) {
     213            $shortcode_params = array_map( 'esc_attr', $shortcode_params );
     214        }
    213215
    214216        $atts = shortcode_atts(
     
    316318                : get_option( 'ecwid_default_category_id' );
    317319
     320        $ecwid_default_category_id = absint( $ecwid_default_category_id );
     321
    318322        return $ecwid_default_category_id;
    319323    }
  • ecwid-shopping-cart/trunk/lib/ecwid_api_v3.php

    r3010593 r3059103  
    574574        }
    575575
    576         $params = array();
     576        $params = array(
     577            'responseFields' => 'generalInfo,account,settings,payment(applePay),featureToggles,formatsAndUnits(currency,currencyPrefix,currencySuffix),designSettings',
     578        );
    577579
    578580        $options = $this->build_request_headers();
  • ecwid-shopping-cart/trunk/readme.txt

    r3055891 r3059103  
    152152
    153153== Changelog ==
     154= 6.12.12 - Mar 27, 2024 =
     155- Fixed a PHP error that could occur when adding a storefront via a shortcode without any parameters.
     156- Minor fixes and improvements.
     157
    154158= 6.12.11 - Mar 21, 2024 =
    155159- WordPress 6.5 compatibility. The new WordPress version will be released soon. The Ecwid ecommerce shopping cart plugin is ready for the new release — everything works well in your WordPress admin and storefront pages. Feel free to upgrade your site to WordPress 6.5.
  • ecwid-shopping-cart/trunk/templates/debug.php

    r2770539 r3059103  
    8484    </div>
    8585</div>
     86
    8687<h2>Options</h2>
    87 
    8888<div>
    8989<?php foreach ( $all_options as $key => $option ) : ?>
Note: See TracChangeset for help on using the changeset viewer.