Ecwid Ecommerce Shopping Cart - Version 4.4.5

Version Description

  • Minor fixes and improvements.
Download this release

Release Info

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

Code changes from version 4.4.4 to 4.4.5

Files changed (3) hide show
  1. ecwid-shopping-cart.php +28 -3
  2. lib/ecwid_api_v3.php +8 -1
  3. readme.txt +5 -2
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.4.4
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -93,6 +93,7 @@ if ( is_admin() ){
93
  add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
94
  add_filter('the_content', 'ecwid_content_started', 0);
95
  add_filter('body_class', 'ecwid_body_class');
 
96
  $ecwid_seo_title = '';
97
  }
98
  add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
@@ -209,6 +210,30 @@ function ecwid_body_class($classes)
209
  return $classes;
210
  }
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  function ecwid_ie8_fonts_inclusion()
213
  {
214
  if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') === false) return;
@@ -1019,10 +1044,10 @@ function ecwid_content_started($content)
1019
 
1020
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
1021
  {
1022
- return "<!-- Ecwid shopping cart plugin v 4.4.4 --><!-- noptimize -->"
1023
  . ecwid_get_scriptjs_code(@$attrs['lang'])
1024
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
1025
- . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.4.4 -->";
1026
  }
1027
 
1028
  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.4.5
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
93
  add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
94
  add_filter('the_content', 'ecwid_content_started', 0);
95
  add_filter('body_class', 'ecwid_body_class');
96
+ add_action('redirect_canonical', 'ecwid_redirect_canonical', 10, 2 );
97
  $ecwid_seo_title = '';
98
  }
99
  add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
210
  return $classes;
211
  }
212
 
213
+ function ecwid_redirect_canonical($redirect_url, $requested_url) {
214
+ if (!is_front_page()) {
215
+ return $redirect_url;
216
+ }
217
+
218
+ if (strpos($requested_url, '_escaped_fragment_') === false) {
219
+ return $redirect_url;
220
+ }
221
+
222
+ $parsed = parse_url($requested_url);
223
+ $query = array();
224
+ parse_str($parsed['query'], $query);
225
+
226
+ if (!array_key_exists('_escaped_fragment_', $query)) {
227
+ return $redirect_url;
228
+ }
229
+
230
+ if (!ecwid_page_has_productbrowser(get_the_ID())) {
231
+ return $redirect_url;
232
+ }
233
+
234
+ return $requested_url;
235
+ }
236
+
237
  function ecwid_ie8_fonts_inclusion()
238
  {
239
  if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') === false) return;
1044
 
1045
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
1046
  {
1047
+ return "<!-- Ecwid shopping cart plugin v 4.4.5 --><!-- noptimize -->"
1048
  . ecwid_get_scriptjs_code(@$attrs['lang'])
1049
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
1050
+ . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.4.5 -->";
1051
  }
1052
 
1053
  function ecwid_get_scriptjs_code($force_lang = null) {
lib/ecwid_api_v3.php CHANGED
@@ -225,7 +225,14 @@ class Ecwid_Api_V3
225
  );
226
  $url = $this->build_request_url($this->_stores_api_url, $request_params);
227
 
228
- $result = EcwidPlatform::http_post_request($url, json_encode($params), array('timeout' => 20));
 
 
 
 
 
 
 
229
 
230
  return $result;
231
  }
225
  );
226
  $url = $this->build_request_url($this->_stores_api_url, $request_params);
227
 
228
+ $result = EcwidPlatform::http_post_request(
229
+ $url, json_encode($params),
230
+ array(
231
+ 'timeout' => 20,
232
+ 'headers' => array(
233
+ 'Content-Type' => 'application/json;application/json;charest="utf-8"')
234
+ )
235
+ );
236
 
237
  return $result;
238
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ecwid
3
  Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
4
  Requires at least: 3.5
5
  Tested up to: 4.6
6
- Stable tag: 4.4.4
7
 
8
  Powerful, easy to use ecommerce shopping cart. Bank level PCI DSS Level 1 security. iPhone & Android apps. Superb support. Free plan available.
9
 
@@ -149,8 +149,11 @@ You can use Ecwid’s built-in import tools to copy your store products from any
149
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
150
 
151
  == Changelog ==
 
 
 
152
  = 4.4.4 =
153
- - **Minor improvements and fixes.**
154
 
155
  = 4.4.3 =
156
  - **Minor fixes and improvements.**
3
  Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
4
  Requires at least: 3.5
5
  Tested up to: 4.6
6
+ Stable tag: 4.4.5
7
 
8
  Powerful, easy to use ecommerce shopping cart. Bank level PCI DSS Level 1 security. iPhone & Android apps. Superb support. Free plan available.
9
 
149
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
150
 
151
  == Changelog ==
152
+ = 4.4.5 =
153
+ - **Minor fixes and improvements.**
154
+
155
  = 4.4.4 =
156
+ - **Minor fixes and improvements.**
157
 
158
  = 4.4.3 =
159
  - **Minor fixes and improvements.**