Plugin Directory

Changeset 3162045


Ignore:
Timestamp:
10/03/2024 11:07:03 AM (18 months ago)
Author:
Ecwid
Message:

Update to version 6.12.20 from GitHub

Location:
ecwid-shopping-cart
Files:
2 added
8 deleted
16 edited
1 copied

Legend:

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

    r3149860 r3162045  
    66Text Domain: ecwid-shopping-cart
    77Author: Ecwid Ecommerce
    8 Version: 6.12.19
     8Version: 6.12.20
    99Author URI: https://ecwid.to/ecwid-site
    1010License: GPLv2 or later
     
    109109
    110110require_once ECWID_PLUGIN_DIR . 'includes/themes.php';
    111 require_once ECWID_PLUGIN_DIR . 'includes/oembed.php';
    112111require_once ECWID_PLUGIN_DIR . 'includes/widgets.php';
    113112require_once ECWID_PLUGIN_DIR . 'includes/shortcodes.php';
    114113require_once ECWID_PLUGIN_DIR . 'includes/kliken.php';
    115114
     115require_once ECWID_PLUGIN_DIR . 'includes/class-ec-store-oembed.php';
    116116require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-message-manager.php';
    117117require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-store-editor.php';
     
    16391639
    16401640    $is_cli_running = Ecwid_Config::is_cli_running();
     1641    $is_wp_playground = Ecwid_Config::is_wp_playground_running();
    16411642
    16421643    $is_newbie = ecwid_is_demo_store();
    16431644
    1644     if( !$is_cli_running && !$is_bulk_activation && $is_newbie && $plugin == plugin_basename( __FILE__ ) ) {
     1645    if( !$is_cli_running && $is_wp_playground && !$is_bulk_activation && $is_newbie && $plugin == plugin_basename( __FILE__ ) ) {
    16451646        wp_safe_redirect( Ecwid_Admin::get_dashboard_url() );
    16461647        exit();
     
    29882989function ecwid_is_paid_account()
    29892990{
     2991    return false;
    29902992    if ( Ecwid_Api_V3::is_available() ) {
    29912993        $api = new Ecwid_Api_V3();
  • ecwid-shopping-cart/tags/6.12.20/includes/class-ec-store-admin-access.php

    r3149860 r3162045  
    4242
    4343    public static function get_users_with_manage_access() {
     44        global $wpdb;
     45        $table_prefix = $wpdb->prefix;
     46
    4447        $args = array(
    4548            'meta_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
    4649                array(
    47                     'key'     => 'wp_capabilities',
     50                    'key'     => $table_prefix . 'capabilities',
    4851                    'value'   => self::CAP_MANAGE_CONTROL_PANEL . '";b:1',
    4952                    'compare' => 'LIKE',
  • ecwid-shopping-cart/tags/6.12.20/includes/class-ecwid-config.php

    r3137594 r3162045  
    131131    }
    132132
     133    public static function is_wp_playground_running() {
     134        return defined( 'IS_PLAYGROUND_PREVIEW' ) && IS_PLAYGROUND_PREVIEW;
     135    }
     136
    133137    public static function load_from_cli( $config ) {
    134138
  • ecwid-shopping-cart/tags/6.12.20/includes/class-ecwid-product-browser.php

    r2963134 r3162045  
    429429
    430430        if ( $api->is_store_feature_available( Ecwid_Api_V3::FEATURE_PRODUCT_SUBTITLES ) ) {
    431 
    432431            $attributes['product_list_subtitles_behavior'] = array(
    433432                'name'              => 'product_list_subtitles_behavior',
     
    448447
    449448        return $attributes;
    450 
    451449    }
    452450
  • ecwid-shopping-cart/tags/6.12.20/includes/class-ecwid-static-page.php

    r3137594 r3162045  
    125125                    'name'              => $param,
    126126                    'is_storefront_api' => true,
    127                     'type'              => true,
     127                    'type'              => 'boolean',
    128128                );
    129129            }
  • ecwid-shopping-cart/tags/6.12.20/includes/class-ecwid-store-page.php

    r3002218 r3162045  
    88    const OPTION_FLUSH_REWRITES     = 'ecwid_flush_rewrites';
    99    const OPTION_REPLACE_TITLE      = 'ecwid_replace_title';
    10     const WARMUP_ACTION             = 'ecwid_warmup_store';
    1110
    1211    const META_STORE_DATA = 'ecwid_store';
     
    397396    protected static function _get_allowed_post_statuses() {
    398397        return array( 'publish', 'private', 'draft' );
    399     }
    400 
    401     public static function warmup_store() {
    402         $store_page = get_post( self::get_current_store_page_id() );
    403 
    404         if ( ! $store_page ) {
    405             return;
    406         }
    407 
    408         $shortcodes = array();
    409         foreach ( Ecwid_Shortcode_Base::get_store_shortcode_names() as $shortcode_name ) {
    410             $shortcodes[] = ecwid_find_shortcodes( $store_page->post_content, $shortcode_name );
    411         }
    412 
    413         if ( count( $shortcodes ) === 0 ) {
    414             return;
    415         }
    416 
    417         $shortcode_data = $shortcodes[0];
    418 
    419         $category = 0;
    420 
    421         if ( isset( $shortcode_data[3] ) ) {
    422             $attributes = shortcode_parse_atts( $shortcode_data[3] );
    423 
    424             if ( ! $attributes ) {
    425                 return;
    426             }
    427 
    428             $category = $attributes['default_category_id'];
    429         }
    430 
    431         $page_url = get_permalink( $store_page );
    432 
    433         include_once ECWID_PLUGIN_DIR . 'lib/ecwid_catalog.php';
    434 
    435         $catalog = new EcwidCatalog( get_ecwid_store_id(), $page_url );
    436 
    437         $catalog->warmup_store_page( intval( $category ) );
    438398    }
    439399
     
    632592add_action( 'init', array( 'Ecwid_Store_Page', 'flush_rewrites' ) );
    633593add_action( 'save_post', array( 'Ecwid_Store_Page', 'on_save_post' ) );
    634 add_action( 'wp_ajax_' . Ecwid_Store_Page::WARMUP_ACTION, array( 'Ecwid_Store_Page', 'warmup_store' ) );
    635594add_action( 'update_option_page_on_front', array( 'Ecwid_Store_Page', 'schedule_flush_rewrites' ) );
    636595add_action( 'display_post_states', array( 'Ecwid_Store_Page', 'display_post_states' ), 10, 2 );
  • ecwid-shopping-cart/tags/6.12.20/readme.txt

    r3149860 r3162045  
    66Requires at least: 4.4
    77Tested up to: 6.6
    8 Stable tag: 6.12.19
     8Stable tag: 6.12.20
    99
    1010Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
     
    154154
    155155== Changelog ==
     156= 6.12.20 - Oct 3, 2024 =
     157- In the "Only featured products" mode, the "Store Home Page" ecommerce block was displayed incorrectly. We've fixed this.
     158- 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.
     159- Internal improvements and optimizations.
     160
    156161= 6.12.19 - Sep 11, 2024 =
    157162- Fixed an issue with processing some store pages links.
  • ecwid-shopping-cart/tags/6.12.20/templates/ecwid-admin.php

    r2778635 r3162045  
    55        jQuery('#ecwid-frame').attr('src', '<?php echo $iframe_src; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>');
    66        ecwidSetPopupCentering('#ecwid-frame');
    7 
    8         jQuery.ajax({
    9             url: ajaxurl + '?action=<?php echo esc_attr( Ecwid_Store_Page::WARMUP_ACTION ); ?>'
    10         });
    117    });
    128    //]]>
  • ecwid-shopping-cart/trunk/ecwid-shopping-cart.php

    r3149860 r3162045  
    66Text Domain: ecwid-shopping-cart
    77Author: Ecwid Ecommerce
    8 Version: 6.12.19
     8Version: 6.12.20
    99Author URI: https://ecwid.to/ecwid-site
    1010License: GPLv2 or later
     
    109109
    110110require_once ECWID_PLUGIN_DIR . 'includes/themes.php';
    111 require_once ECWID_PLUGIN_DIR . 'includes/oembed.php';
    112111require_once ECWID_PLUGIN_DIR . 'includes/widgets.php';
    113112require_once ECWID_PLUGIN_DIR . 'includes/shortcodes.php';
    114113require_once ECWID_PLUGIN_DIR . 'includes/kliken.php';
    115114
     115require_once ECWID_PLUGIN_DIR . 'includes/class-ec-store-oembed.php';
    116116require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-message-manager.php';
    117117require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-store-editor.php';
     
    16391639
    16401640    $is_cli_running = Ecwid_Config::is_cli_running();
     1641    $is_wp_playground = Ecwid_Config::is_wp_playground_running();
    16411642
    16421643    $is_newbie = ecwid_is_demo_store();
    16431644
    1644     if( !$is_cli_running && !$is_bulk_activation && $is_newbie && $plugin == plugin_basename( __FILE__ ) ) {
     1645    if( !$is_cli_running && $is_wp_playground && !$is_bulk_activation && $is_newbie && $plugin == plugin_basename( __FILE__ ) ) {
    16451646        wp_safe_redirect( Ecwid_Admin::get_dashboard_url() );
    16461647        exit();
     
    29882989function ecwid_is_paid_account()
    29892990{
     2991    return false;
    29902992    if ( Ecwid_Api_V3::is_available() ) {
    29912993        $api = new Ecwid_Api_V3();
  • ecwid-shopping-cart/trunk/includes/class-ec-store-admin-access.php

    r3149860 r3162045  
    4242
    4343    public static function get_users_with_manage_access() {
     44        global $wpdb;
     45        $table_prefix = $wpdb->prefix;
     46
    4447        $args = array(
    4548            'meta_query' => array( //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
    4649                array(
    47                     'key'     => 'wp_capabilities',
     50                    'key'     => $table_prefix . 'capabilities',
    4851                    'value'   => self::CAP_MANAGE_CONTROL_PANEL . '";b:1',
    4952                    'compare' => 'LIKE',
  • ecwid-shopping-cart/trunk/includes/class-ecwid-config.php

    r3137594 r3162045  
    131131    }
    132132
     133    public static function is_wp_playground_running() {
     134        return defined( 'IS_PLAYGROUND_PREVIEW' ) && IS_PLAYGROUND_PREVIEW;
     135    }
     136
    133137    public static function load_from_cli( $config ) {
    134138
  • ecwid-shopping-cart/trunk/includes/class-ecwid-product-browser.php

    r2963134 r3162045  
    429429
    430430        if ( $api->is_store_feature_available( Ecwid_Api_V3::FEATURE_PRODUCT_SUBTITLES ) ) {
    431 
    432431            $attributes['product_list_subtitles_behavior'] = array(
    433432                'name'              => 'product_list_subtitles_behavior',
     
    448447
    449448        return $attributes;
    450 
    451449    }
    452450
  • ecwid-shopping-cart/trunk/includes/class-ecwid-static-page.php

    r3137594 r3162045  
    125125                    'name'              => $param,
    126126                    'is_storefront_api' => true,
    127                     'type'              => true,
     127                    'type'              => 'boolean',
    128128                );
    129129            }
  • ecwid-shopping-cart/trunk/includes/class-ecwid-store-page.php

    r3002218 r3162045  
    88    const OPTION_FLUSH_REWRITES     = 'ecwid_flush_rewrites';
    99    const OPTION_REPLACE_TITLE      = 'ecwid_replace_title';
    10     const WARMUP_ACTION             = 'ecwid_warmup_store';
    1110
    1211    const META_STORE_DATA = 'ecwid_store';
     
    397396    protected static function _get_allowed_post_statuses() {
    398397        return array( 'publish', 'private', 'draft' );
    399     }
    400 
    401     public static function warmup_store() {
    402         $store_page = get_post( self::get_current_store_page_id() );
    403 
    404         if ( ! $store_page ) {
    405             return;
    406         }
    407 
    408         $shortcodes = array();
    409         foreach ( Ecwid_Shortcode_Base::get_store_shortcode_names() as $shortcode_name ) {
    410             $shortcodes[] = ecwid_find_shortcodes( $store_page->post_content, $shortcode_name );
    411         }
    412 
    413         if ( count( $shortcodes ) === 0 ) {
    414             return;
    415         }
    416 
    417         $shortcode_data = $shortcodes[0];
    418 
    419         $category = 0;
    420 
    421         if ( isset( $shortcode_data[3] ) ) {
    422             $attributes = shortcode_parse_atts( $shortcode_data[3] );
    423 
    424             if ( ! $attributes ) {
    425                 return;
    426             }
    427 
    428             $category = $attributes['default_category_id'];
    429         }
    430 
    431         $page_url = get_permalink( $store_page );
    432 
    433         include_once ECWID_PLUGIN_DIR . 'lib/ecwid_catalog.php';
    434 
    435         $catalog = new EcwidCatalog( get_ecwid_store_id(), $page_url );
    436 
    437         $catalog->warmup_store_page( intval( $category ) );
    438398    }
    439399
     
    632592add_action( 'init', array( 'Ecwid_Store_Page', 'flush_rewrites' ) );
    633593add_action( 'save_post', array( 'Ecwid_Store_Page', 'on_save_post' ) );
    634 add_action( 'wp_ajax_' . Ecwid_Store_Page::WARMUP_ACTION, array( 'Ecwid_Store_Page', 'warmup_store' ) );
    635594add_action( 'update_option_page_on_front', array( 'Ecwid_Store_Page', 'schedule_flush_rewrites' ) );
    636595add_action( 'display_post_states', array( 'Ecwid_Store_Page', 'display_post_states' ), 10, 2 );
  • ecwid-shopping-cart/trunk/readme.txt

    r3149860 r3162045  
    66Requires at least: 4.4
    77Tested up to: 6.6
    8 Stable tag: 6.12.19
     8Stable tag: 6.12.20
    99
    1010Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
     
    154154
    155155== Changelog ==
     156= 6.12.20 - Oct 3, 2024 =
     157- In the "Only featured products" mode, the "Store Home Page" ecommerce block was displayed incorrectly. We've fixed this.
     158- 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.
     159- Internal improvements and optimizations.
     160
    156161= 6.12.19 - Sep 11, 2024 =
    157162- Fixed an issue with processing some store pages links.
  • ecwid-shopping-cart/trunk/templates/ecwid-admin.php

    r2778635 r3162045  
    55        jQuery('#ecwid-frame').attr('src', '<?php echo $iframe_src; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>');
    66        ecwidSetPopupCentering('#ecwid-frame');
    7 
    8         jQuery.ajax({
    9             url: ajaxurl + '?action=<?php echo esc_attr( Ecwid_Store_Page::WARMUP_ACTION ); ?>'
    10         });
    117    });
    128    //]]>
Note: See TracChangeset for help on using the changeset viewer.