Ecwid Ecommerce Shopping Cart - Version 4.0.7

Version Description

  • Fixed a problem with connecting to the Ecwid API on the servers with misconfigured or outdated CURL. Some servers couldn't connect to Ecwid from to display the Ecwid Control Panel inside Wordpress backend. That caused a "Connection problem" error message, which some of Ecwid users saw in their Wordpress admin section. We added a fix that should resolve this problem and make the Ecwid Control Panel inside Wordpress work OK for those users.
  • Improvements for the new drop-down categories store menu added in the version 4 of the plugin. If you haven't tried it yet, go check it out in the Appearance -> Menus settings of your site.
  • Fixes and improvements for the plugin settings pages.
Download this release

Release Info

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

Code changes from version 4.0.6 to 4.0.7

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.6
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -622,16 +622,18 @@ function ecwid_seo_compatibility_restore()
622
  }
623
 
624
  function add_ecwid_admin_bar_node() {
625
- global $wp_admin_bar;
626
-
627
- if ( !is_super_admin() || !is_admin_bar_showing() )
628
- return;
629
 
 
 
630
 
631
- $theme = ecwid_get_theme_name();
632
  $store_url = ecwid_get_store_page_url();
633
- $subject = sprintf(__('Ecwid plugin doesn\'t work well with my "%s" theme', 'ecwid-shopping-cart'), $theme);
634
- $body = <<<TEXT
 
 
 
635
  Hey Ecwid,
636
 
637
  My store looks bad with my theme on Wordpress.
@@ -643,8 +645,26 @@ Can you have a look?
643
 
644
  Thanks.
645
  TEXT;
646
- $body = __( $body, 'ecwid-shopping-cart' );
647
- $body = sprintf( $body, $theme, $store_url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
648
 
649
  $wp_admin_bar->add_menu(array(
650
  'id' => 'ecwid-report-problem',
@@ -665,7 +685,10 @@ TEXT;
665
  "id" => "ecwid-help",
666
  "title" => __("Get help", 'ecwid-shopping-cart'),
667
  "parent" => "ecwid-main",
668
- 'href' => 'http://help.ecwid.com'
 
 
 
669
  )
670
  );
671
  $wp_admin_bar->add_menu(array(
@@ -987,10 +1010,10 @@ function ecwid_content_started($content)
987
 
988
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
989
  {
990
- return "<!-- Ecwid shopping cart plugin v 4.0.6 --><!-- noptimize -->"
991
  . ecwid_get_scriptjs_code(@$attrs['lang'])
992
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
993
- . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.0.6 -->";
994
  }
995
 
996
  function ecwid_get_scriptjs_code($force_lang = null) {
@@ -1691,7 +1714,7 @@ function ecwid_nav_menu_links()
1691
  'list-name' => __( 'Cart', 'ecwid-shopping-cart' ),
1692
  'classes' => 'ecwid-cart',
1693
  'url' => 'cart',
1694
- 'label' => __('Shopping cart', 'ecwid-shopping-cart')
1695
  ), 'Search' => array(
1696
  'list-name' => __( 'Product Search', 'ecwid-shopping-cart' ),
1697
  'classes' => 'ecwid-product-search',
@@ -1966,9 +1989,9 @@ function ecwid_general_settings_do_page() {
1966
  substr( get_bloginfo( 'language' ), 0, 2 )
1967
  );
1968
 
1969
- $result = wp_remote_get( $iframe_src );
1970
 
1971
- if ( is_array( $result ) && $result['response']['code'] == 200 ) {
1972
  ecwid_admin_do_page( 'dashboard' );
1973
  } else {
1974
  require_once ECWID_PLUGIN_DIR . '/templates/reconnect-sso.php';
@@ -1982,7 +2005,6 @@ function ecwid_admin_do_page( $page ) {
1982
 
1983
  global $ecwid_oauth;
1984
 
1985
- Ecwid_Message_Manager::reset_hidden_messages();
1986
  if ($page == 'dashboard') {
1987
  $show_reconnect = true;
1988
  }
@@ -1999,8 +2021,8 @@ function ecwid_admin_do_page( $page ) {
1999
  substr(get_bloginfo('language'), 0, 2)
2000
  );
2001
 
2002
- $result = wp_remote_get($iframe_src);
2003
- if ($result['response']['code'] != 200) {
2004
 
2005
  if (ecwid_test_oauth(true)) {
2006
  require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
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.7
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
622
  }
623
 
624
  function add_ecwid_admin_bar_node() {
625
+ global $wp_admin_bar;
 
 
 
626
 
627
+ if ( !is_super_admin() || !is_admin_bar_showing() )
628
+ return;
629
 
630
+ $theme = ecwid_get_theme_name();
631
  $store_url = ecwid_get_store_page_url();
632
+
633
+
634
+ if (!is_admin()) {
635
+ $subject = sprintf(__('Ecwid plugin doesn\'t work well with my "%s" theme', 'ecwid-shopping-cart'), $theme);
636
+ $body = <<<TEXT
637
  Hey Ecwid,
638
 
639
  My store looks bad with my theme on Wordpress.
645
 
646
  Thanks.
647
  TEXT;
648
+ } else {
649
+ $subject = __('I have a problem with my Ecwid store', 'ecwid-shopping-cart');
650
+ $body = <<<TEXT
651
+ Hey Ecwid,
652
+
653
+ I have a problem with my Ecwid store.
654
+
655
+ [Please provide details here]
656
+
657
+ The theme title is %s.
658
+ The store URL is %
659
+
660
+ Can you have a look?
661
+
662
+ Thanks.
663
+ TEXT;
664
+ }
665
+
666
+ $body = __($body, 'ecwid-shopping-cart');
667
+ $body = sprintf($body, $theme, $store_url);
668
 
669
  $wp_admin_bar->add_menu(array(
670
  'id' => 'ecwid-report-problem',
685
  "id" => "ecwid-help",
686
  "title" => __("Get help", 'ecwid-shopping-cart'),
687
  "parent" => "ecwid-main",
688
+ 'href' => __('https://help.ecwid.com', 'ecwid-shopping-cart'),
689
+ 'meta' => array(
690
+ 'target' => '_blank'
691
+ )
692
  )
693
  );
694
  $wp_admin_bar->add_menu(array(
1010
 
1011
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
1012
  {
1013
+ return "<!-- Ecwid shopping cart plugin v 4.0.7 --><!-- noptimize -->"
1014
  . ecwid_get_scriptjs_code(@$attrs['lang'])
1015
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
1016
+ . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.0.7 -->";
1017
  }
1018
 
1019
  function ecwid_get_scriptjs_code($force_lang = null) {
1714
  'list-name' => __( 'Cart', 'ecwid-shopping-cart' ),
1715
  'classes' => 'ecwid-cart',
1716
  'url' => 'cart',
1717
+ 'label' => __('Shopping Cart', 'ecwid-shopping-cart')
1718
  ), 'Search' => array(
1719
  'list-name' => __( 'Product Search', 'ecwid-shopping-cart' ),
1720
  'classes' => 'ecwid-product-search',
1989
  substr( get_bloginfo( 'language' ), 0, 2 )
1990
  );
1991
 
1992
+ $result = EcwidPlatform::fetch_url( $iframe_src );
1993
 
1994
+ if ( is_array( $result ) && $result['code'] == 200 ) {
1995
  ecwid_admin_do_page( 'dashboard' );
1996
  } else {
1997
  require_once ECWID_PLUGIN_DIR . '/templates/reconnect-sso.php';
2005
 
2006
  global $ecwid_oauth;
2007
 
 
2008
  if ($page == 'dashboard') {
2009
  $show_reconnect = true;
2010
  }
2021
  substr(get_bloginfo('language'), 0, 2)
2022
  );
2023
 
2024
+ $result = EcwidPlatform::fetch_url($iframe_src);
2025
+ if ($result['code'] != 200) {
2026
 
2027
  if (ecwid_test_oauth(true)) {
2028
  require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
images/landing/secure-pci.svg CHANGED
@@ -1,48 +1 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 68.24 69.41" enable-background="new 0 0 68.24 69.41" xml:space="preserve">
6
- <path fill="#70B4D5" d="M20.15,37.54h0.59c0.35,0,0.62,0.07,0.78,0.22c0.17,0.15,0.25,0.37,0.25,0.68c0,0.3-0.1,0.54-0.3,0.7
7
- c-0.2,0.16-0.5,0.24-0.9,0.24h-0.43V37.54z M22.5,36.95c-0.39-0.32-0.95-0.48-1.69-0.48h-1.96v6.19h1.3v-2.2h0.56
8
- c0.76,0,1.35-0.18,1.76-0.53c0.41-0.35,0.62-0.86,0.62-1.53C23.08,37.75,22.89,37.27,22.5,36.95z"/>
9
- <path fill="#70B4D5" d="M27.53,37.59c0.23,0.08,0.46,0.18,0.69,0.29l0.42-1.07c-0.6-0.29-1.2-0.44-1.79-0.44
10
- c-0.58,0-1.09,0.13-1.53,0.39c-0.43,0.26-0.77,0.63-1,1.11c-0.23,0.48-0.35,1.05-0.35,1.69c0,1.02,0.24,1.81,0.71,2.35
11
- c0.47,0.55,1.15,0.82,2.04,0.82c0.62,0,1.18-0.11,1.68-0.32v-1.1c-0.61,0.22-1.13,0.33-1.56,0.33c-1.03,0-1.54-0.69-1.54-2.07
12
- c0-0.66,0.13-1.18,0.4-1.55c0.27-0.37,0.65-0.56,1.14-0.56C27.07,37.47,27.29,37.51,27.53,37.59z"/>
13
- <path fill="#70B4D5" d="M31.01,42.65v-6.19h-1.3v6.19H31.01z"/>
14
- <path fill="#70B4D5" d="M34.28,40.86V39.8h-2.25v1.06H34.28z"/>
15
- <path fill="#70B4D5" d="M39.56,37.26c-0.55-0.53-1.33-0.8-2.33-0.8h-1.92v6.19h1.73c1.08,0,1.91-0.27,2.49-0.81s0.86-1.32,0.86-2.34
16
- C40.39,38.54,40.12,37.8,39.56,37.26z M37.17,41.57h-0.56v-4.03h0.69c1.16,0,1.74,0.66,1.74,1.99
17
- C39.04,40.89,38.42,41.57,37.17,41.57L37.17,41.57z"/>
18
- <path fill="#70B4D5" d="M44.96,39.91c-0.21-0.28-0.6-0.56-1.18-0.83c-0.43-0.21-0.71-0.35-0.82-0.43c-0.12-0.08-0.2-0.16-0.25-0.25
19
- c-0.05-0.09-0.08-0.19-0.08-0.3c0-0.19,0.07-0.34,0.2-0.45c0.13-0.12,0.32-0.17,0.57-0.17c0.21,0,0.42,0.03,0.63,0.08
20
- c0.21,0.05,0.48,0.15,0.81,0.28l0.42-1.02c-0.32-0.14-0.62-0.25-0.91-0.32c-0.29-0.08-0.59-0.11-0.91-0.11
21
- c-0.65,0-1.16,0.16-1.52,0.47c-0.37,0.31-0.55,0.74-0.55,1.29c0,0.29,0.06,0.55,0.17,0.76c0.11,0.22,0.26,0.41,0.45,0.57
22
- c0.19,0.16,0.47,0.33,0.84,0.51c0.4,0.19,0.66,0.33,0.79,0.42c0.13,0.09,0.23,0.18,0.3,0.27c0.07,0.09,0.1,0.2,0.1,0.32
23
- c0,0.22-0.08,0.38-0.23,0.49c-0.15,0.11-0.37,0.17-0.66,0.17c-0.24,0-0.5-0.04-0.79-0.11c-0.29-0.08-0.64-0.21-1.05-0.39v1.22
24
- c0.5,0.25,1.08,0.37,1.73,0.37c0.71,0,1.26-0.16,1.66-0.48c0.4-0.32,0.6-0.76,0.6-1.32C45.28,40.53,45.17,40.19,44.96,39.91z"/>
25
- <path fill="#70B4D5" d="M49.69,39.91c-0.21-0.28-0.6-0.56-1.18-0.83c-0.43-0.21-0.71-0.35-0.82-0.43c-0.12-0.08-0.2-0.16-0.25-0.25
26
- c-0.05-0.09-0.08-0.19-0.08-0.3c0-0.19,0.07-0.34,0.2-0.45c0.13-0.12,0.32-0.17,0.57-0.17c0.21,0,0.42,0.03,0.63,0.08
27
- c0.21,0.05,0.48,0.15,0.81,0.28l0.42-1.02c-0.32-0.14-0.62-0.25-0.91-0.32c-0.29-0.08-0.59-0.11-0.91-0.11
28
- c-0.65,0-1.16,0.16-1.52,0.47c-0.37,0.31-0.55,0.74-0.55,1.29c0,0.29,0.06,0.55,0.17,0.76c0.11,0.22,0.26,0.41,0.45,0.57
29
- c0.19,0.16,0.47,0.33,0.84,0.51c0.4,0.19,0.66,0.33,0.79,0.42c0.13,0.09,0.23,0.18,0.3,0.27c0.07,0.09,0.1,0.2,0.1,0.32
30
- c0,0.22-0.08,0.38-0.23,0.49s-0.37,0.17-0.66,0.17c-0.24,0-0.5-0.04-0.79-0.11c-0.29-0.08-0.64-0.21-1.05-0.39v1.22
31
- c0.5,0.25,1.08,0.37,1.73,0.37c0.71,0,1.26-0.16,1.66-0.48c0.4-0.32,0.6-0.76,0.6-1.32C50,40.53,49.9,40.19,49.69,39.91z"/>
32
- <path fill="#70B4D5" d="M17.6,21.39h-1.42l-2.63,2.12l0.83,1.05l0.94-0.76c0.11-0.09,0.31-0.28,0.6-0.57l-0.03,0.86l-0.02,0.78v4.78
33
- h1.73V21.39z"/>
34
- <path fill="#70B4D5" d="M28.45,29.65V28.2h-3.31v-6.81H23.4v8.25H28.45z"/>
35
- <path fill="#70B4D5" d="M34.57,28.2H31.6v-2.13h2.77v-1.43H31.6v-1.81h2.97v-1.43h-4.7v8.25h4.7V28.2z"/>
36
- <path fill="#70B4D5" d="M39.39,26.31c-0.24,0.87-0.38,1.47-0.42,1.82c-0.02-0.15-0.08-0.42-0.17-0.8c-0.09-0.39-0.18-0.72-0.27-1.01
37
- l-1.54-4.91h-1.75l2.77,8.25h1.89l2.78-8.25h-1.75L39.39,26.31z"/>
38
- <path fill="#70B4D5" d="M48.41,28.2h-2.97v-2.13h2.77v-1.43h-2.77v-1.81h2.97v-1.43h-4.7v8.25h4.7V28.2z"/>
39
- <path fill="#70B4D5" d="M55.16,29.65V28.2h-3.31v-6.81h-1.73v8.25H55.16z"/>
40
- <g>
41
- <path fill="#70B4D5" d="M34.28,67.45L33.7,67.1c-0.34-0.2-0.82-0.45-1.42-0.77C25.69,62.84,5.64,52.25,5.64,25.61
42
- c0-5.17,0.02-14.82,0.02-14.82l0-0.56L6.1,9.88c0.42-0.32,10.4-7.91,28.18-7.91c16.65,0,27.68,7.55,28.14,7.88l0.49,0.34l0,0.6
43
- c0,0,0.01,9.66,0.01,14.82c0,26.6-20.06,37.23-26.65,40.72c-0.59,0.31-1.07,0.57-1.4,0.76L34.28,67.45z M7.95,11.38
44
- c0,2.18-0.01,9.83-0.01,14.23c0,25.25,19.13,35.36,25.41,38.68c0.35,0.18,0.66,0.35,0.93,0.5c0.27-0.14,0.57-0.31,0.91-0.49
45
- c6.29-3.33,25.43-13.47,25.43-38.69c0-4.38-0.01-11.98-0.01-14.2c-2.29-1.42-12.34-7.15-26.33-7.15
46
- C19.37,4.27,10.04,9.96,7.95,11.38z"/>
47
- </g>
48
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="60" height="68" viewBox="0 0 60 68"><path fill="#53ACC9" d="M30 1.562c15.18 0 26.117 6.07 28.672 7.627.004 2.44.016 10.503.016 15.16 0 11.498-3.775 21.395-11.223 29.422-6.07 6.543-13.104 10.203-16.484 11.963-.366.19-.694.36-.98.515-.292-.152-.622-.325-.997-.518-6.848-3.558-27.69-14.373-27.69-41.377 0-4.683.01-12.807.015-15.2C2.32 8.49 4.732 7.006 8.4 5.537 12.93 3.723 20.35 1.562 30 1.562M30 .25C10.804.25.015 8.468.015 8.468S0 18.815 0 24.35c0 30.476 25.658 40.865 30 43.4 4.342-2.535 30-12.992 30-43.4 0-5.535-.016-15.884-.016-15.884S47.982.25 30 .25z"/><path fill="#53ACC9" d="M14.527 28.562h-3.472v-7.066H9.238v8.566h5.292v-1.5h-.003zm6.424 0h-3.116v-2.21h2.9v-1.487h-2.9v-1.88h3.117v-1.487h-4.933v8.565h4.934v-1.5zm6.674-7.064L26 26.595c-.25.898-.396 1.527-.438 1.887-.022-.156-.083-.435-.18-.835-.095-.403-.188-.753-.276-1.054l-1.612-5.098H21.66l2.906 8.565h1.98l2.914-8.565h-1.837v.003zm7.845 7.064h-3.117v-2.21h2.9v-1.487h-2.9v-1.88h3.117v-1.487h-4.934v8.565h4.934v-1.5zm7.077 0h-3.475v-7.066h-1.816v8.566h5.29v-1.5zm6.757-7.064l-2.76 2.197.872 1.09.984-.793c.117-.094.326-.29.627-.592l-.03.893-.017.813v4.958h1.81v-8.568h-1.486v.002zm-33.55 14.984h-2.052v6.424h1.362V40.62h.585c.794 0 1.41-.183 1.842-.548.433-.366.648-.895.648-1.586 0-.663-.202-1.163-.61-1.5-.405-.338-.996-.503-1.776-.504zm.7 2.776c-.208.164-.52.247-.94.247h-.45v-1.907h.62c.373 0 .646.076.82.23s.263.388.263.706c0 .316-.106.557-.313.724zm5.628-1.735c.234 0 .473.042.716.127.244.084.485.185.726.3l.44-1.11c-.63-.3-1.255-.45-1.88-.45-.61 0-1.145.134-1.6.4s-.807.652-1.05 1.155c-.243.502-.364 1.087-.364 1.756 0 1.062.248 1.876.743 2.442s1.21.85 2.145.85c.65 0 1.237-.105 1.766-.325v-1.145c-.64.226-1.188.337-1.64.337-1.075 0-1.612-.717-1.612-2.15 0-.687.14-1.224.42-1.608.282-.385.68-.578 1.194-.578h-.004zm3.006 5.383h1.365v-6.424h-1.365v6.424zm7.896-6.423h-2.018v6.426h1.82c1.137 0 2.006-.282 2.608-.845s.903-1.372.903-2.43c0-.993-.29-1.766-.87-2.32-.577-.553-1.393-.83-2.443-.832zm-.07 5.3h-.584V37.6h.726c1.22 0 1.828.69 1.828 2.07 0 1.41-.656 2.113-1.97 2.114zm6.94-2.582c-.453-.218-.742-.367-.862-.45-.12-.082-.21-.17-.267-.26s-.082-.194-.082-.314c0-.192.067-.35.206-.47.138-.12.334-.18.592-.18.217 0 .438.028.662.083.225.053.508.153.85.295l.44-1.058c-.33-.145-.648-.255-.952-.334-.305-.08-.62-.12-.955-.12-.68 0-1.213.163-1.598.487-.387.324-.58.772-.58 1.34 0 .303.06.566.177.793.116.225.273.422.47.592s.49.348.884.533c.42.2.698.344.833.435.135.09.24.185.31.283s.106.21.106.337c0 .226-.08.395-.24.51-.16.116-.392.174-.69.174-.25 0-.524-.04-.824-.12-.3-.08-.667-.216-1.1-.41v1.267c.526.258 1.134.388 1.82.388.74 0 1.323-.168 1.74-.503.417-.335.626-.79.626-1.37 0-.42-.11-.773-.333-1.063s-.636-.578-1.236-.866zm4.957 0c-.453-.218-.74-.367-.862-.45-.12-.082-.21-.17-.266-.26s-.082-.194-.082-.314c0-.192.068-.35.207-.47.14-.12.336-.18.594-.18.218 0 .437.028.66.083.224.053.51.153.85.295l.44-1.058c-.33-.145-.648-.255-.952-.334-.304-.08-.622-.12-.956-.12-.678 0-1.21.163-1.597.487s-.577.772-.577 1.34c0 .303.06.566.175.793.117.225.272.422.47.592.196.17.49.348.885.533.418.2.696.344.832.435.137.09.24.185.31.283s.104.21.104.337c0 .226-.078.395-.238.51-.16.116-.39.174-.688.174-.25 0-.523-.04-.824-.12-.303-.08-.668-.216-1.102-.41v1.267c.527.258 1.135.388 1.82.388.744 0 1.325-.168 1.742-.503.417-.335.625-.79.625-1.37 0-.42-.113-.773-.337-1.063-.223-.29-.635-.577-1.236-.864l.004-.002z"/></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-ecwid-oauth.php CHANGED
@@ -37,7 +37,7 @@ class Ecwid_OAuth {
37
 
38
  public function test_post()
39
  {
40
- $return = wp_remote_post($this->get_test_post_url());
41
 
42
  return is_array($return);
43
  }
@@ -108,7 +108,7 @@ class Ecwid_OAuth {
108
 
109
  $params['grant_type'] = 'authorization_code';
110
 
111
- $return = wp_remote_post('https://my.ecwid.com/api/oauth/token', array('body' => $params));
112
 
113
  if (is_array($return) && isset($return['body'])) {
114
  $result = json_decode($return['body']);
@@ -218,7 +218,7 @@ class Ecwid_OAuth {
218
 
219
  if (isset($last_error)) {
220
  $url = 'http://' . APP_ECWID_COM . '/script.js?805056&data_platform=wporg&data_wporg_error=' . urlencode($last_error) . '&url=' . urlencode(get_bloginfo('url'));
221
- wp_remote_get($url);
222
  }
223
 
224
  wp_redirect('admin.php?page=ecwid&connection_error' . ($mode == self::MODE_RECONNECT ? '&reconnect' : ''));
37
 
38
  public function test_post()
39
  {
40
+ $return = EcwidPlatform::http_post_request($this->get_test_post_url());
41
 
42
  return is_array($return);
43
  }
108
 
109
  $params['grant_type'] = 'authorization_code';
110
 
111
+ $return = EcwidPlatform::http_post_request('https://my.ecwid.com/api/oauth/token', $params);
112
 
113
  if (is_array($return) && isset($return['body'])) {
114
  $result = json_decode($return['body']);
218
 
219
  if (isset($last_error)) {
220
  $url = 'http://' . APP_ECWID_COM . '/script.js?805056&data_platform=wporg&data_wporg_error=' . urlencode($last_error) . '&url=' . urlencode(get_bloginfo('url'));
221
+ EcwidPlatform::fetch_url($url);
222
  }
223
 
224
  wp_redirect('admin.php?page=ecwid&connection_error' . ($mode == self::MODE_RECONNECT ? '&reconnect' : ''));
includes/themes/class-ecwid-theme-twentyfifteen.php CHANGED
@@ -33,6 +33,10 @@ class Ecwid_Theme_2015 extends Ecwid_Theme_Base
33
  ),
34
  '_multiwidget' => 1
35
  );
 
 
 
 
36
  }
37
 
38
  update_option('widget_ecwidstorelink', $options);
33
  ),
34
  '_multiwidget' => 1
35
  );
36
+ } else {
37
+ $options[2] = array(
38
+ 'label' => __('Shop', 'ecwid-shopping-cart')
39
+ );
40
  }
41
 
42
  update_option('widget_ecwidstorelink', $options);
includes/themes/class-ecwid-theme-twentysixteen.php CHANGED
@@ -23,10 +23,12 @@ class Ecwid_Theme_2016 extends Ecwid_Theme_Base
23
  $widgets = get_option('sidebars_widgets');
24
 
25
  if (strpos(implode(' ', $widgets['sidebar-1']), 'ecwidstorelink') === false) {
 
26
  array_unshift($widgets['sidebar-1'], 'ecwidstorelink-2');
27
  wp_set_sidebars_widgets($widgets);
28
 
29
  $options = get_option('widget_ecwidstorelink');
 
30
  if (!$options) {
31
  $options = array(
32
  2 => array(
@@ -34,6 +36,10 @@ class Ecwid_Theme_2016 extends Ecwid_Theme_Base
34
  ),
35
  '_multiwidget' => 1
36
  );
 
 
 
 
37
  }
38
 
39
  update_option('widget_ecwidstorelink', $options);
23
  $widgets = get_option('sidebars_widgets');
24
 
25
  if (strpos(implode(' ', $widgets['sidebar-1']), 'ecwidstorelink') === false) {
26
+
27
  array_unshift($widgets['sidebar-1'], 'ecwidstorelink-2');
28
  wp_set_sidebars_widgets($widgets);
29
 
30
  $options = get_option('widget_ecwidstorelink');
31
+
32
  if (!$options) {
33
  $options = array(
34
  2 => array(
36
  ),
37
  '_multiwidget' => 1
38
  );
39
+ } else {
40
+ $options[2] = array(
41
+ 'label' => __('Shop', 'ecwid-shopping-cart')
42
+ );
43
  }
44
 
45
  update_option('widget_ecwidstorelink', $options);
js/frontend.js CHANGED
@@ -14,4 +14,5 @@ jQuery(document).ready(function() {
14
  });
15
  }
16
 
 
17
  })
14
  });
15
  }
16
 
17
+ jQuery('.ecwid-store-with-categories a').click(function() {jQuery(':focus').blur()});
18
  })
languages/ecwid-shopping-cart-ru_RU.mo CHANGED
Binary file
languages/ecwid-shopping-cart-ru_RU.po CHANGED
@@ -8,7 +8,7 @@ msgid "Ecwid is a free full-featured shopping cart. It can be easily integrated
8
  msgstr "Эквид – бесплатный полнофункциональный интернет-магазин. Легко встраивается в любой WordPress сайт и настраивается за 5 минут."
9
 
10
  msgid "Get help"
11
- msgstr "Получить помощь"
12
 
13
  msgid "Go to Ecwid site"
14
  msgstr "Пройти на сайт Эквида"
@@ -406,11 +406,11 @@ msgstr "Адаптивный дизайн"
406
  msgid "Your store looks perfect<br />on all devices"
407
  msgstr "Ваш магазин выглядит превосходно<br />на любом устройстве: планшете, смартфоне и ноутбуке."
408
 
409
- msgid "PCI-DSS Certified"
410
- msgstr "Сертификация по PCI-DSS"
411
 
412
  msgid "Secure checkout with over 40<br />payment options"
413
- msgstr "Эквид сертифицирован по стандарту Level 1 PCI-DSS – самому высокому уровню безопасности передачи данных."
414
 
415
  msgid "Global Reach"
416
  msgstr "Глобальное решение"
@@ -522,3 +522,9 @@ msgstr "Вы сможете добавлять товары, обрабатыв
522
 
523
  msgid "Re-connect to Enable Control Panel"
524
  msgstr "Подключить панель управления"
 
 
 
 
 
 
8
  msgstr "Эквид – бесплатный полнофункциональный интернет-магазин. Легко встраивается в любой WordPress сайт и настраивается за 5 минут."
9
 
10
  msgid "Get help"
11
+ msgstr "Задать вопрос"
12
 
13
  msgid "Go to Ecwid site"
14
  msgstr "Пройти на сайт Эквида"
406
  msgid "Your store looks perfect<br />on all devices"
407
  msgstr "Ваш магазин выглядит превосходно<br />на любом устройстве: планшете, смартфоне и ноутбуке."
408
 
409
+ msgid "PCI DSS Certified"
410
+ msgstr "Сертификация по PCI DSS"
411
 
412
  msgid "Secure checkout with over 40<br />payment options"
413
+ msgstr "Эквид сертифицирован по стандарту Level 1 PCI DSS – самому высокому уровню безопасности передачи данных."
414
 
415
  msgid "Global Reach"
416
  msgstr "Глобальное решение"
522
 
523
  msgid "Re-connect to Enable Control Panel"
524
  msgstr "Подключить панель управления"
525
+
526
+ msgid "Report a problem with the store"
527
+ msgstr "Сообщить о проблеме"
528
+
529
+ msgid "https://help.ecwid.com"
530
+ msgstr "https://help.ecwid.com/customer/ru/portal/articles"
lib/ecwid_platform.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  class EcwidPlatform {
4
 
 
 
5
  static public function esc_attr($value)
6
  {
7
  return esc_attr($value);
@@ -24,8 +26,15 @@ class EcwidPlatform {
24
  if ($use_file_get_contents == 'Y') {
25
  $result = @file_get_contents($url);
26
  } else {
 
 
 
27
  $result = wp_remote_get( $url, array( 'timeout' => get_option( 'ecwid_remote_get_timeout', 5 ) ) );
28
- if (!is_array($result)) {
 
 
 
 
29
  $result = @file_get_contents($url);
30
  if (!empty($result)) {
31
  update_option('ecwid_fetch_url_use_file_get_contents', true);
@@ -63,6 +72,42 @@ class EcwidPlatform {
63
  }
64
 
65
  return $return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
  }
 
 
2
 
3
  class EcwidPlatform {
4
 
5
+ static protected $http_use_streams = false;
6
+
7
  static public function esc_attr($value)
8
  {
9
  return esc_attr($value);
26
  if ($use_file_get_contents == 'Y') {
27
  $result = @file_get_contents($url);
28
  } else {
29
+ if (get_option('ecwid_http_use_stream', false)) {
30
+ self::$http_use_streams = true;
31
+ }
32
  $result = wp_remote_get( $url, array( 'timeout' => get_option( 'ecwid_remote_get_timeout', 5 ) ) );
33
+
34
+ if (get_option('ecwid_http_use_stream', false)) {
35
+ self::$http_use_streams = false;
36
+ }
37
+ if (!is_array($result)) {
38
  $result = @file_get_contents($url);
39
  if (!empty($result)) {
40
  update_option('ecwid_fetch_url_use_file_get_contents', true);
72
  }
73
 
74
  return $return;
75
+ }
76
+
77
+ static public function http_post_request($url, $data = array())
78
+ {
79
+ $result = null;
80
+ if (get_option('ecwid_http_use_stream', false) !== true) {
81
+ $result = wp_remote_post(
82
+ $url,
83
+ array( 'body' => $data )
84
+ );
85
+ }
86
+
87
+ if ( !is_array($result) ) {
88
+ self::$http_use_streams = true;
89
+ $result = wp_remote_post(
90
+ $url,
91
+ array('body' => $data)
92
+ );
93
+ self::$http_use_streams = false;
94
 
95
+ if ( is_array($result) ) {
96
+ update_option('ecwid_http_use_stream', true);
97
+ }
98
+ }
99
+
100
+ return $result;
101
+ }
102
+
103
+ static public function http_api_transports($transports)
104
+ {
105
+ if (self::$http_use_streams) {
106
+ return array('streams');
107
+ }
108
+
109
+ return $transports;
110
  }
111
  }
112
+
113
+ add_filter('http_api_transports', array('EcwidPlatform', 'http_api_transports'));
lib/phpseclib/Rijndael.php CHANGED
@@ -873,7 +873,7 @@ class Ecwid_Crypt_Rijndael extends Ecwid_Crypt_Base
873
  // So here we are'nt under the same heavy timing-stress as we are in _de/encryptBlock() or de/encrypt().
874
  // However...the here generated function- $code, stored as php callback in $this->inline_crypt, must work as fast as even possible.
875
 
876
- $lambda_functions =& Crypt_Rijndael::_getLambdaFunctions();
877
 
878
  // We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
879
  // (Currently, for Crypt_Rijndael/AES, one generated $lambda_function cost on php5.5@32bit ~80kb unfreeable mem and ~130kb on php5.5@64bit)
873
  // So here we are'nt under the same heavy timing-stress as we are in _de/encryptBlock() or de/encrypt().
874
  // However...the here generated function- $code, stored as php callback in $this->inline_crypt, must work as fast as even possible.
875
 
876
+ $lambda_functions =& Ecwid_Crypt_Rijndael::_getLambdaFunctions();
877
 
878
  // We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
879
  // (Currently, for Crypt_Rijndael/AES, one generated $lambda_function cost on php5.5@32bit ~80kb unfreeable mem and ~130kb on php5.5@64bit)
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Ecwid Shopping Cart ===
2
  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.6
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
 
@@ -104,6 +104,11 @@ 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.0.6 =
108
  - **Fixed a bug affecting the links in store sidebar widgets.** The bug appeared in the version 4.0.5. It’s now fixed and all categories/cart/search links should work OK
109
 
1
  === Ecwid Shopping Cart ===
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
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
 
104
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
105
 
106
  == Changelog ==
107
+ = 4.0.7 =
108
+ - **Fixed a problem with connecting to the Ecwid API on the servers with misconfigured or outdated CURL.** Some servers couldn't connect to Ecwid from to display the Ecwid Control Panel inside Wordpress backend. That caused a "Connection problem" error message, which some of Ecwid users saw in their Wordpress admin section. We added a fix that should resolve this problem and make the Ecwid Control Panel inside Wordpress work OK for those users.
109
+ - Improvements for the new drop-down categories store menu added in the version 4 of the plugin. If you haven't tried it yet, go check it out in the Appearance -> Menus settings of your site.
110
+ - Fixes and improvements for the plugin settings pages.
111
+
112
  = 4.0.6 =
113
  - **Fixed a bug affecting the links in store sidebar widgets.** The bug appeared in the version 4.0.5. It’s now fixed and all categories/cart/search links should work OK
114
 
templates/landing.php CHANGED
@@ -123,7 +123,7 @@
123
  <img src="<?php echo ECWID_PLUGIN_URL; ?>images/landing/secure-pci.svg" class="secure">
124
  </div>
125
  <div class="ecwid-features-bottom-item-text">
126
- <h3><?php _e('PCI-DSS Certified', 'ecwid-shopping-cart'); ?></h3>
127
  <p><?php _e('Secure checkout with over 40<br />payment options', 'ecwid-shopping-cart'); ?></p>
128
  </div>
129
  </div>
123
  <img src="<?php echo ECWID_PLUGIN_URL; ?>images/landing/secure-pci.svg" class="secure">
124
  </div>
125
  <div class="ecwid-features-bottom-item-text">
126
+ <h3><?php _e('PCI DSS Certified', 'ecwid-shopping-cart'); ?></h3>
127
  <p><?php _e('Secure checkout with over 40<br />payment options', 'ecwid-shopping-cart'); ?></p>
128
  </div>
129
  </div>