Ecwid Ecommerce Shopping Cart - Version 4.1.3

Version Description

  • Improvements for the plugin Dashboard page layout and a few minor fixes.
Download this release

Release Info

Developer Ecwid
Plugin Icon 128x128 Ecwid Ecommerce Shopping Cart
Version 4.1.3
Comparing to
See all releases

Code changes from version 4.1.2 to 4.1.3

ecwid-shopping-cart.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?source=wporg
5
  Description: Ecwid 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.
6
  Text Domain: ecwid-shopping-cart
7
  Author: Ecwid Team
8
- Version: 4.1.2
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -972,10 +972,10 @@ function ecwid_content_started($content)
972
 
973
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
974
  {
975
- return "<!-- Ecwid shopping cart plugin v 4.1.2 --><!-- noptimize -->"
976
  . ecwid_get_scriptjs_code(@$attrs['lang'])
977
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
978
- . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.1.2 -->";
979
  }
980
 
981
  function ecwid_get_scriptjs_code($force_lang = null) {
@@ -1464,6 +1464,21 @@ EOT;
1464
 
1465
  }
1466
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1467
  function ecwid_show_admin_messages() {
1468
  if (is_admin()) {
1469
  Ecwid_Message_Manager::show_messages();
@@ -1938,7 +1953,7 @@ function ecwid_get_register_link()
1938
  function ecwid_create_store() {
1939
  $api = new Ecwid_Api_V3();
1940
  $result = $api->create_store();
1941
- if ($result['response']['code'] == 200) {
1942
  $data = json_decode($result['body']);
1943
 
1944
  update_option('ecwid_store_id', $data->id);
@@ -1946,6 +1961,14 @@ function ecwid_create_store() {
1946
  $api->save_token($data->token);
1947
  update_option('ecwid_oauth_scope', 'read_profile read_catalog allow_sso');
1948
 
 
 
 
 
 
 
 
 
1949
  header( 'HTTP/1.1 200 OK' );
1950
 
1951
  } else {
@@ -2005,7 +2028,7 @@ function ecwid_general_settings_do_page() {
2005
  $time = time() - get_option('ecwid_time_correction', 0);
2006
  $page = 'dashboard';
2007
  $iframe_src = sprintf(
2008
- 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s',
2009
  get_ecwid_store_id(),
2010
  Ecwid_Api_V3::get_token(),
2011
  $time,
@@ -2024,7 +2047,7 @@ function ecwid_general_settings_do_page() {
2024
  $time = strtotime($result['headers']['date']);
2025
 
2026
  $iframe_src = sprintf(
2027
- 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s',
2028
  get_ecwid_store_id(),
2029
  Ecwid_Api_V3::get_token(),
2030
  $time,
@@ -2065,7 +2088,7 @@ function ecwid_admin_do_page( $page ) {
2065
  $time = time() - get_option('ecwid_time_correction', 0);
2066
 
2067
  $iframe_src = sprintf(
2068
- 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s',
2069
  get_ecwid_store_id(),
2070
  Ecwid_Api_V3::get_token(),
2071
  $time,
@@ -2710,6 +2733,11 @@ function ecwid_get_categories_js_url($callback) {
2710
  return 'https://my.ecwid.com/categories.js?ownerid=' . get_ecwid_store_id() . '&callback=' . $callback;
2711
  }
2712
 
 
 
 
 
 
2713
  /*
2714
  * Basically a copy of has_shortcode that returns the matched shortcode
2715
  */
@@ -2729,7 +2757,7 @@ function ecwid_find_shortcodes( $content, $tag ) {
2729
  if ( $tag === $shortcode[2] ) {
2730
  $result[] = $shortcode;
2731
  } elseif ( !empty($shortcode[5]) && $found = ecwid_find_shortcodes( $shortcode[5], $tag ) ) {
2732
- $result[] = $found;
2733
  }
2734
  }
2735
 
@@ -2741,10 +2769,6 @@ function ecwid_find_shortcodes( $content, $tag ) {
2741
  return false;
2742
  }
2743
 
2744
- function ecwid_use_old_landing() {
2745
- return get_option('ecwid_installation_date') % 10 >= 0;
2746
- }
2747
-
2748
  // Since we use shortcode regex in our own functions, we need it to be persistent
2749
  function ecwid_get_shortcode_regex() {
2750
  global $shortcode_tags;
5
  Description: Ecwid 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.
6
  Text Domain: ecwid-shopping-cart
7
  Author: Ecwid Team
8
+ Version: 4.1.3
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
972
 
973
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
974
  {
975
+ return "<!-- Ecwid shopping cart plugin v 4.1.3 --><!-- noptimize -->"
976
  . ecwid_get_scriptjs_code(@$attrs['lang'])
977
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
978
+ . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.1.3 -->";
979
  }
980
 
981
  function ecwid_get_scriptjs_code($force_lang = null) {
1464
 
1465
  }
1466
 
1467
+ add_action('in_admin_header', 'ecwid_disable_other_notices');
1468
+ function ecwid_disable_other_notices() {
1469
+
1470
+ if (get_current_screen()->base != 'toplevel_page_ecwid') return;
1471
+ global $wp_filter;
1472
+
1473
+ foreach ($wp_filter['admin_notices'] as $priority => $collection) {
1474
+ foreach ($collection as $name => $item) {
1475
+ if ($name != 'ecwid_show_admin_messages') {
1476
+ unset($wp_filter['admin_notices'][$priority][$name]);
1477
+ }
1478
+ }
1479
+ }
1480
+ }
1481
+
1482
  function ecwid_show_admin_messages() {
1483
  if (is_admin()) {
1484
  Ecwid_Message_Manager::show_messages();
1953
  function ecwid_create_store() {
1954
  $api = new Ecwid_Api_V3();
1955
  $result = $api->create_store();
1956
+ if (is_array($result) && $result['response']['code'] == 200) {
1957
  $data = json_decode($result['body']);
1958
 
1959
  update_option('ecwid_store_id', $data->id);
1961
  $api->save_token($data->token);
1962
  update_option('ecwid_oauth_scope', 'read_profile read_catalog allow_sso');
1963
 
1964
+ Ecwid_Kissmetrics::record('Signed Up');
1965
+ Ecwid_Kissmetrics::set( 'plan_id', 'WPORG_SKINNY_FREE-1' );
1966
+ Ecwid_Kissmetrics::set( 'plan_period', '1' );
1967
+ Ecwid_Kissmetrics::set( 'plan_name', 'WPORG_SKINNY_FREE' );
1968
+ Ecwid_Kissmetrics::set( 'is_paid', 'false' );
1969
+ Ecwid_Kissmetrics::set( 'channelid', 'wporg' );
1970
+ Ecwid_Kissmetrics::set( 'registered_via_api', 'true' );
1971
+
1972
  header( 'HTTP/1.1 200 OK' );
1973
 
1974
  } else {
2028
  $time = time() - get_option('ecwid_time_correction', 0);
2029
  $page = 'dashboard';
2030
  $iframe_src = sprintf(
2031
+ 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s&min-height=700',
2032
  get_ecwid_store_id(),
2033
  Ecwid_Api_V3::get_token(),
2034
  $time,
2047
  $time = strtotime($result['headers']['date']);
2048
 
2049
  $iframe_src = sprintf(
2050
+ 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s&min-height=700',
2051
  get_ecwid_store_id(),
2052
  Ecwid_Api_V3::get_token(),
2053
  $time,
2088
  $time = time() - get_option('ecwid_time_correction', 0);
2089
 
2090
  $iframe_src = sprintf(
2091
+ 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s&min-height=700',
2092
  get_ecwid_store_id(),
2093
  Ecwid_Api_V3::get_token(),
2094
  $time,
2733
  return 'https://my.ecwid.com/categories.js?ownerid=' . get_ecwid_store_id() . '&callback=' . $callback;
2734
  }
2735
 
2736
+
2737
+ function ecwid_use_old_landing() {
2738
+ return get_option('ecwid_installation_date') % 10 >= 2 || version_compare(get_bloginfo('version'), '3.7') < 0;
2739
+ }
2740
+
2741
  /*
2742
  * Basically a copy of has_shortcode that returns the matched shortcode
2743
  */
2757
  if ( $tag === $shortcode[2] ) {
2758
  $result[] = $shortcode;
2759
  } elseif ( !empty($shortcode[5]) && $found = ecwid_find_shortcodes( $shortcode[5], $tag ) ) {
2760
+ $result = array_merge($result, $found);
2761
  }
2762
  }
2763
 
2769
  return false;
2770
  }
2771
 
 
 
 
 
2772
  // Since we use shortcode regex in our own functions, we need it to be persistent
2773
  function ecwid_get_shortcode_regex() {
2774
  global $shortcode_tags;
includes/class-ecwid-kissmetrics.php CHANGED
@@ -12,16 +12,23 @@ class Ecwid_Kissmetrics {
12
  self::$instance = new Ecwid_Kissmetrics();
13
  }
14
 
15
- public static function record($event) {
16
- $fire_in_background = array('wpPluginDeactivated');
 
17
 
18
- if (in_array($event, $fire_in_background)) {
19
- self::$instance->_record(self::EVENT_PREFIX . $event);
 
 
20
  } else {
21
- self::$instance->_enqueue_record(self::EVENT_PREFIX . $event);
22
  }
23
  }
24
 
 
 
 
 
25
  private function __construct() {
26
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
27
  }
12
  self::$instance = new Ecwid_Kissmetrics();
13
  }
14
 
15
+ public static function record( $event ) {
16
+ $fire_in_background = array( 'wpPluginDeactivated' );
17
+ $raw_names = array( 'Signed Up' );
18
 
19
+ $name = in_array( $event, $raw_names ) ? $event : self::EVENT_PREFIX . $event;
20
+
21
+ if ( in_array( $event, $fire_in_background ) ) {
22
+ self::$instance->_record( $name );
23
  } else {
24
+ self::$instance->_enqueue_record( $name );
25
  }
26
  }
27
 
28
+ public static function set( $name, $value ) {
29
+ self::$instance->_enqueue_property( $name, $value );
30
+ }
31
+
32
  private function __construct() {
33
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
34
  }
js/landing.js CHANGED
@@ -16,6 +16,8 @@ jQuery(document).ready(function(){
16
 
17
  jQuery('.create-store-button').click(function() {
18
 
 
 
19
  var $context = jQuery(this).closest('.ecwid-button');
20
  jQuery(hide_on_loading + ', ' + invisible_on_loading, $context).fadeTo(150, .01).promise().done(function() {
21
  jQuery(hide_on_loading, $context).hide();
16
 
17
  jQuery('.create-store-button').click(function() {
18
 
19
+ ecwid_kissmetrics_record('createAccountButtonClick');
20
+
21
  var $context = jQuery(this).closest('.ecwid-button');
22
  jQuery(hide_on_loading + ', ' + invisible_on_loading, $context).fadeTo(150, .01).promise().done(function() {
23
  jQuery(hide_on_loading, $context).hide();
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
  Contributors: ecwid
3
  Tags: ecwid, shopping cart, ecommerce, paypal, e-commerce, online store, store, shop, cart, digital goods, downloadable products, product catalog, facebook
4
  Requires at least: 3.5
5
- Tested up to: 4.4
6
- Stable tag: 4.1.2
7
 
8
- Powerful, easy to use shopping cart. PCI DSS Level 1: same as your bank. Sell on the go iPhone&Android app. Superb support. Free plan available
9
 
10
  == Description ==
11
  Ecwid is a powerful, secure and easy-to-use shopping cart solution that allows you to sell on your WordPress website. Join over *900,000* sellers in *175* countries and sell globally with over *40* international payment options, real-time shipping integrations and support of *45* languages.
@@ -104,6 +104,9 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
104
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
105
 
106
  == Changelog ==
 
 
 
107
  = 4.1.2 =
108
  - **Ecwid mobile apps badges of the dashboard page.** We made a facelift for the plugin dashboard page footer and included mobile apps badges there to make it easier for new users to find and install Ecwid mobile applications for iPhone, iPad and Android. Why bother to install it? It allows you to manage your store and sell on the go.
109
  - **Fixes for the embedded store Control Panel.** There were issues in the store control panel when the Wordpress site was hosted on a server with incorrect system date set. We made the plugin tolerant of this kind of hosting issues – the embedded store Control Panel should now be displayed fine on every server.
2
  Contributors: ecwid
3
  Tags: ecwid, shopping cart, ecommerce, paypal, e-commerce, online store, store, shop, cart, digital goods, downloadable products, product catalog, facebook
4
  Requires at least: 3.5
5
+ Tested up to: 4.5
6
+ Stable tag: 4.1.3
7
 
8
+ Powerful, easy to use shopping cart. Bank level PCI DSS Level 1 security. Sell on the go iPhone & Android app. Superb support. Free plan available.
9
 
10
  == Description ==
11
  Ecwid is a powerful, secure and easy-to-use shopping cart solution that allows you to sell on your WordPress website. Join over *900,000* sellers in *175* countries and sell globally with over *40* international payment options, real-time shipping integrations and support of *45* languages.
104
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
105
 
106
  == Changelog ==
107
+ = 4.1.3 =
108
+ - Improvements for the plugin Dashboard page layout and a few minor fixes.
109
+
110
  = 4.1.2 =
111
  - **Ecwid mobile apps badges of the dashboard page.** We made a facelift for the plugin dashboard page footer and included mobile apps badges there to make it easier for new users to find and install Ecwid mobile applications for iPhone, iPad and Android. Why bother to install it? It allows you to manage your store and sell on the go.
112
  - **Fixes for the embedded store Control Panel.** There were issues in the store control panel when the Wordpress site was hosted on a server with incorrect system date set. We made the plugin tolerant of this kind of hosting issues – the embedded store Control Panel should now be displayed fine on every server.