Ecwid Ecommerce Shopping Cart - Version 4.0.3

Version Description

  • Fixes for a few warning messages appearing on some sites with the new version of the plugin (v4).
Download this release

Release Info

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

Code changes from version 4.0.2 to 4.0.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.0.2
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -16,7 +16,6 @@ register_uninstall_hook( __FILE__, 'ecwid_uninstall' );
16
  define("APP_ECWID_COM", 'app.ecwid.com');
17
  define("ECWID_DEMO_STORE_ID", 1003);
18
 
19
-
20
  if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
21
  define( 'ECWID_PLUGIN_DIR', plugin_dir_path( realpath(__FILE__) ) );
22
  }
@@ -983,10 +982,10 @@ function ecwid_content_started($content)
983
 
984
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
985
  {
986
- return "<!-- Ecwid shopping cart plugin v 4.0.2 --><!-- noptimize -->"
987
  . ecwid_get_scriptjs_code(@$attrs['lang'])
988
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
989
- . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.0.2 -->";
990
  }
991
 
992
  function ecwid_get_scriptjs_code($force_lang = null) {
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.0.3
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
16
  define("APP_ECWID_COM", 'app.ecwid.com');
17
  define("ECWID_DEMO_STORE_ID", 1003);
18
 
 
19
  if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
20
  define( 'ECWID_PLUGIN_DIR', plugin_dir_path( realpath(__FILE__) ) );
21
  }
982
 
983
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
984
  {
985
+ return "<!-- Ecwid shopping cart plugin v 4.0.3 --><!-- noptimize -->"
986
  . ecwid_get_scriptjs_code(@$attrs['lang'])
987
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
988
+ . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.0.3 -->";
989
  }
990
 
991
  function ecwid_get_scriptjs_code($force_lang = null) {
includes/class-ecwid-message-manager.php CHANGED
@@ -4,8 +4,6 @@ class Ecwid_Message_Manager
4
  {
5
  protected $messages = array();
6
 
7
- public $show_no_oauth = false;
8
-
9
  protected function Ecwid_Message_Manager()
10
  {
11
  $this->init_messages();
4
  {
5
  protected $messages = array();
6
 
 
 
7
  protected function Ecwid_Message_Manager()
8
  {
9
  $this->init_messages();
includes/class-ecwid-oauth.php CHANGED
@@ -302,7 +302,10 @@ class Ecwid_OAuth {
302
  protected function _load_state() {
303
  if (isset($_COOKIE['ecwid_oauth_state'])) {
304
  $this->state = @unserialize( $_COOKIE['ecwid_oauth_state'] );
305
- } else {
 
 
 
306
  $this->state = new stdClass();
307
  $this->state->reconnect_scopes = array();
308
  $this->state->reconnect_error = '';
302
  protected function _load_state() {
303
  if (isset($_COOKIE['ecwid_oauth_state'])) {
304
  $this->state = @unserialize( $_COOKIE['ecwid_oauth_state'] );
305
+
306
+ }
307
+
308
+ if (!is_object($this->state)) {
309
  $this->state = new stdClass();
310
  $this->state->reconnect_scopes = array();
311
  $this->state->reconnect_error = '';
lib/phpseclib/Base.php CHANGED
@@ -1051,7 +1051,7 @@ class Ecwid_Crypt_Base
1051
  case CRYPT_MODE_CBC:
1052
  if (!defined('OPENSSL_RAW_DATA')) {
1053
  $padding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->block_size);
1054
- $ciphertext.= substr(openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true), 0, $this->block_size);
1055
  }
1056
  $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->decryptIV);
1057
  if ($this->continuousBuffer) {
@@ -1331,7 +1331,7 @@ class Ecwid_Crypt_Base
1331
  for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
1332
  $block = substr($plaintext, $i, $block_size);
1333
  if (strlen($block) > strlen($buffer['ciphertext'])) {
1334
- $result = openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1335
  $result = !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
1336
  $buffer['ciphertext'].= $result;
1337
  }
@@ -1342,7 +1342,7 @@ class Ecwid_Crypt_Base
1342
  } else {
1343
  for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
1344
  $block = substr($plaintext, $i, $block_size);
1345
- $otp = openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1346
  $otp = !defined('OPENSSL_RAW_DATA') ? substr($otp, 0, -$this->block_size) : $otp;
1347
  $this->_increment_str($xor);
1348
  $ciphertext.= $block ^ $otp;
@@ -1386,9 +1386,9 @@ class Ecwid_Crypt_Base
1386
  }
1387
  if ($this->continuousBuffer) {
1388
  if (!defined('OPENSSL_RAW_DATA')) {
1389
- $encryptIV.= openssl_encrypt('', $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1390
  }
1391
- $encryptIV = openssl_decrypt($encryptIV, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1392
  if ($overflow) {
1393
  $this->_increment_str($encryptIV);
1394
  }
1051
  case CRYPT_MODE_CBC:
1052
  if (!defined('OPENSSL_RAW_DATA')) {
1053
  $padding = str_repeat(chr($this->block_size), $this->block_size) ^ substr($ciphertext, -$this->block_size);
1054
+ $ciphertext.= substr(@openssl_encrypt($padding, $this->cipher_name_openssl_ecb, $this->key, true), 0, $this->block_size);
1055
  }
1056
  $plaintext = openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->decryptIV);
1057
  if ($this->continuousBuffer) {
1331
  for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
1332
  $block = substr($plaintext, $i, $block_size);
1333
  if (strlen($block) > strlen($buffer['ciphertext'])) {
1334
+ $result = @openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1335
  $result = !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
1336
  $buffer['ciphertext'].= $result;
1337
  }
1342
  } else {
1343
  for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
1344
  $block = substr($plaintext, $i, $block_size);
1345
+ $otp = @openssl_encrypt($xor, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1346
  $otp = !defined('OPENSSL_RAW_DATA') ? substr($otp, 0, -$this->block_size) : $otp;
1347
  $this->_increment_str($xor);
1348
  $ciphertext.= $block ^ $otp;
1386
  }
1387
  if ($this->continuousBuffer) {
1388
  if (!defined('OPENSSL_RAW_DATA')) {
1389
+ $encryptIV.= @openssl_encrypt('', $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1390
  }
1391
+ $encryptIV = @openssl_decrypt($encryptIV, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
1392
  if ($overflow) {
1393
  $this->_increment_str($encryptIV);
1394
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ecwid
3
  Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
4
  Requires at least: 3.5
5
  Tested up to: 4.4
6
- Stable tag: 4.0.2
7
 
8
  Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
9
 
@@ -107,6 +107,9 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
107
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
108
 
109
  == Changelog ==
 
 
 
110
  = 4.0.2 =
111
  - **Built-in Full-featured Store Control Panel.** You can now manage your store, add new products, track sales and more right in your Wordpress site admin backend. No redirects, no external dashboards, no extra login/password – you now have a single place and single login to manage your site and your store. To make it even better, we added the Products and Sales shortcuts to your Wordpress admin menu – feel free to use them to easily access your inventory and sales list.
112
  - **New Drop-down Categories Menu.** Noticed how Wordpress automatically updates your site menu adding your site pages to it? Ecwid now does it too: open "Appearance -> Menus" in your Wordpress control panel and add the "Store with Categories Menu" item to your site menu. A drop-down menu containing your store categories will automatically appear on your site. It will keep the categories list up to date even if you often change your store categories. Rest assured your customers can easily quickly get to the category of products they are interested in right from the site menu.
3
  Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
4
  Requires at least: 3.5
5
  Tested up to: 4.4
6
+ Stable tag: 4.0.3
7
 
8
  Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
9
 
107
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
108
 
109
  == Changelog ==
110
+ = 4.0.3 =
111
+ - Fixes for a few warning messages appearing on some sites with the new version of the plugin (v4).
112
+
113
  = 4.0.2 =
114
  - **Built-in Full-featured Store Control Panel.** You can now manage your store, add new products, track sales and more right in your Wordpress site admin backend. No redirects, no external dashboards, no extra login/password – you now have a single place and single login to manage your site and your store. To make it even better, we added the Products and Sales shortcuts to your Wordpress admin menu – feel free to use them to easily access your inventory and sales list.
115
  - **New Drop-down Categories Menu.** Noticed how Wordpress automatically updates your site menu adding your site pages to it? Ecwid now does it too: open "Appearance -> Menus" in your Wordpress control panel and add the "Store with Categories Menu" item to your site menu. A drop-down menu containing your store categories will automatically appear on your site. It will keep the categories list up to date even if you often change your store categories. Rest assured your customers can easily quickly get to the category of products they are interested in right from the site menu.
templates/connect.php CHANGED
@@ -27,14 +27,6 @@
27
  <?php _e( 'After clicking button you need to login and accept permissions to use our plugin', 'ecwid-shopping-cart' ); ?>
28
  </div>
29
 
30
- <?php else: ?>
31
-
32
- <!--div class="note auth-error">
33
- <span>
34
- <?php _e( 'Connection error - after clicking button you need to login and accept permissions to use our plugin. Please, try again.', 'ecwid-shopping-cart' ); ?>
35
- </span>
36
- </div-->
37
-
38
  <?php endif; ?>
39
 
40
  <h4 class="no-oauth where-to-find-store-id" style="text-align: center"><?php _e('Where to find your Store ID:', 'ecwid-shopping-cart'); ?></h4>
27
  <?php _e( 'After clicking button you need to login and accept permissions to use our plugin', 'ecwid-shopping-cart' ); ?>
28
  </div>
29
 
 
 
 
 
 
 
 
 
30
  <?php endif; ?>
31
 
32
  <h4 class="no-oauth where-to-find-store-id" style="text-align: center"><?php _e('Where to find your Store ID:', 'ecwid-shopping-cart'); ?></h4>