Version Description
May 14, 2020 =
Improve compatibility with the Elementor page builder plugin. Ecwid storefronts on Elementor-powered websites loaded slowly on devices with an old iOS version (less than 13.3.1). We fixed it and now stores should work well.
Better warning messages for the site administrator about the hosting connection issues. Some hosting do not allow WordPress plugins connect external services and APIs in their code. That might be because of a hosting server misconfiguration or a tricky firewall setup. Good news is that the Ecwid plugin would work well even in such environment you can add a store to your ecommerce site pages and sell. But some of the plugin feature would be disabled. For example, SEO tools wouldn't work and the embedded store control panel wouldn't show. We added extra warning messages and fallbacks to the plugin code to better handle such situations. If you face such a problem, we recommend contacting your hosting provider to make sure your server can connect the Ecwid API.
Minor improvements for Twenty Twenty and NewShop themes.
Minor fixes and improvements.
See full changelog
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 6.9.6 |
Comparing to | |
See all releases |
Code changes from version 6.9.5 to 6.9.6
- css/admin.css +1 -0
- css/integrations/elementor.css +9 -0
- ecwid-shopping-cart.php +22 -2
- includes/class-ecwid-admin-main-page.php +11 -5
- includes/class-ecwid-admin-ui-framework.php +1 -1
- includes/class-ecwid-message-manager.php +30 -10
- includes/class-ecwid-oauth.php +8 -0
- includes/class-ecwid-static-page.php +7 -0
- includes/class-ecwid-store-page.php +6 -1
- includes/integrations/class-ecwid-integration-aiosp.php +11 -3
- includes/integrations/class-ecwid-integration-elementor.php +2 -0
- includes/themes.php +2 -2
- includes/themes/class-ecwid-theme-base.php +9 -0
- js/admin-menu.js +10 -0
- lib/ecwid_api_v3.php +2 -1
- lib/ecwid_requests.php +3 -2
- readme.txt +6 -3
- templates/admin/welcome-connect.php +1 -33
- templates/admin/welcome-connection-message.php +38 -0
- templates/admin/welcome-create.php +4 -0
@@ -72,6 +72,7 @@ div.ecwid-message {
|
|
72 |
margin-bottom: 15px;
|
73 |
padding: 27px 29px 20px 30px;
|
74 |
display: block;
|
|
|
75 |
}
|
76 |
|
77 |
.ecwid-message a {
|
72 |
margin-bottom: 15px;
|
73 |
padding: 27px 29px 20px 30px;
|
74 |
display: block;
|
75 |
+
color: inherit;
|
76 |
}
|
77 |
|
78 |
.ecwid-message a {
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* fixed re-render flex block in ios */
|
2 |
+
@media only screen and (max-width : 1224px) {
|
3 |
+
html#ecwid_html body#ecwid_body .elementor-row,
|
4 |
+
html#ecwid_html body#ecwid_body .elementor-column-wrap,
|
5 |
+
html#ecwid_html body#ecwid_body .elementor-widget-wrap
|
6 |
+
{
|
7 |
+
height: 100%;
|
8 |
+
}
|
9 |
+
}
|
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?partner=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 Ecommerce
|
8 |
-
Version: 6.9.
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
License: GPLv2 or later
|
11 |
*/
|
@@ -89,6 +89,7 @@ if ( is_admin() ) {
|
|
89 |
add_action( 'wp_head', 'ecwid_seo_compatibility_restore', 1000 );
|
90 |
add_action( 'wp_head', 'ecwid_print_inline_js_config' );
|
91 |
add_action( 'wp_head', 'ecwid_product_browser_url_in_head' );
|
|
|
92 |
|
93 |
add_action( 'send_headers', 'ecwid_503_on_store_closed' );
|
94 |
add_action( 'wp_enqueue_scripts', 'ecwid_enqueue_frontend' );
|
@@ -508,6 +509,20 @@ function ecwid_add_chameleon( $js ) {
|
|
508 |
return $js;
|
509 |
}
|
510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
function ecwid_load_textdomain() {
|
512 |
|
513 |
load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
@@ -2004,7 +2019,7 @@ function ecwid_register_admin_styles($hook_suffix) {
|
|
2004 |
$is_connection_error = Ecwid_Admin_Main_Page::is_connection_error();
|
2005 |
|
2006 |
// Can't really remember why it checks against the raw version, not the sanitized one; consider refactoring
|
2007 |
-
if ( ecwid_is_demo_store( get_option( 'ecwid_store_id' ) ) || !get_option( 'ecwid_store_id' ) || $is_reconnect || $is_connection_error ) {
|
2008 |
|
2009 |
if( class_exists('Ecwid_Admin') && isset($_GET['page']) && $_GET['page'] != Ecwid_Admin::ADMIN_SLUG ) {
|
2010 |
return;
|
@@ -2212,6 +2227,11 @@ function ecwid_create_store() {
|
|
2212 |
|
2213 |
} else {
|
2214 |
|
|
|
|
|
|
|
|
|
|
|
2215 |
header( 'HTTP/1.1 ' . $result['response']['code'] . ' ' . $result['response']['message'] );
|
2216 |
die();
|
2217 |
}
|
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 Ecommerce
|
8 |
+
Version: 6.9.6
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
License: GPLv2 or later
|
11 |
*/
|
89 |
add_action( 'wp_head', 'ecwid_seo_compatibility_restore', 1000 );
|
90 |
add_action( 'wp_head', 'ecwid_print_inline_js_config' );
|
91 |
add_action( 'wp_head', 'ecwid_product_browser_url_in_head' );
|
92 |
+
add_action( 'wp_head', 'ec_add_mailchimp_js' );
|
93 |
|
94 |
add_action( 'send_headers', 'ecwid_503_on_store_closed' );
|
95 |
add_action( 'wp_enqueue_scripts', 'ecwid_enqueue_frontend' );
|
509 |
return $js;
|
510 |
}
|
511 |
|
512 |
+
function ec_add_mailchimp_js() {
|
513 |
+
|
514 |
+
if( !is_front_page() && !Ecwid_Store_Page::is_store_page() ) {
|
515 |
+
return;
|
516 |
+
}
|
517 |
+
|
518 |
+
$api = new Ecwid_Api_V3();
|
519 |
+
$profile = $api->get_store_profile();
|
520 |
+
|
521 |
+
if( isset($profile->mailchimpSettings) && isset($profile->mailchimpSettings->script) ) {
|
522 |
+
echo PHP_EOL . $profile->mailchimpSettings->script . PHP_EOL;
|
523 |
+
}
|
524 |
+
}
|
525 |
+
|
526 |
function ecwid_load_textdomain() {
|
527 |
|
528 |
load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
2019 |
$is_connection_error = Ecwid_Admin_Main_Page::is_connection_error();
|
2020 |
|
2021 |
// Can't really remember why it checks against the raw version, not the sanitized one; consider refactoring
|
2022 |
+
if ( ecwid_is_demo_store( get_option( 'ecwid_store_id' ) ) || !get_option( 'ecwid_store_id' ) || $is_reconnect || $is_connection_error || Ecwid_Api_V3::get_token() == false ) {
|
2023 |
|
2024 |
if( class_exists('Ecwid_Admin') && isset($_GET['page']) && $_GET['page'] != Ecwid_Admin::ADMIN_SLUG ) {
|
2025 |
return;
|
2227 |
|
2228 |
} else {
|
2229 |
|
2230 |
+
if( is_wp_error( $result ) ) {
|
2231 |
+
header( 'HTTP/1.1 409 Error' );
|
2232 |
+
die();
|
2233 |
+
}
|
2234 |
+
|
2235 |
header( 'HTTP/1.1 ' . $result['response']['code'] . ' ' . $result['response']['message'] );
|
2236 |
die();
|
2237 |
}
|
@@ -85,18 +85,24 @@ class Ecwid_Admin_Main_Page
|
|
85 |
|
86 |
public function _do_integrated_admin_page( $page = self::PAGE_HASH_DASHBOARD )
|
87 |
{
|
|
|
|
|
88 |
if (isset($_GET['show_timeout']) && $_GET['show_timeout'] == '1') {
|
89 |
require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
|
90 |
die();
|
91 |
}
|
92 |
|
93 |
-
if (Ecwid_Api_V3::get_token() == false) {
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
die();
|
96 |
}
|
97 |
|
98 |
-
global $ecwid_oauth;
|
99 |
-
|
100 |
if (isset($_GET['ec-page']) && $_GET['ec-page']) {
|
101 |
$page = $_GET['ec-page'];
|
102 |
}
|
@@ -170,7 +176,7 @@ class Ecwid_Admin_Main_Page
|
|
170 |
if (ecwid_test_oauth(true)) {
|
171 |
require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
|
172 |
} else {
|
173 |
-
require_once ECWID_PLUGIN_DIR . 'templates/simple-dashboard.php';
|
174 |
}
|
175 |
} else {
|
176 |
require_once ECWID_PLUGIN_DIR . 'templates/ecwid-admin.php';
|
85 |
|
86 |
public function _do_integrated_admin_page( $page = self::PAGE_HASH_DASHBOARD )
|
87 |
{
|
88 |
+
global $ecwid_oauth;
|
89 |
+
|
90 |
if (isset($_GET['show_timeout']) && $_GET['show_timeout'] == '1') {
|
91 |
require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
|
92 |
die();
|
93 |
}
|
94 |
|
95 |
+
if ( Ecwid_Api_V3::get_token() == false ) {
|
96 |
+
|
97 |
+
if( !$ecwid_oauth->has_scope( 'allow_sso' ) ) {
|
98 |
+
require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
|
99 |
+
} else {
|
100 |
+
require_once ECWID_PLUGIN_DIR . 'templates/admin/simple-dashboard.php';
|
101 |
+
}
|
102 |
+
|
103 |
die();
|
104 |
}
|
105 |
|
|
|
|
|
106 |
if (isset($_GET['ec-page']) && $_GET['ec-page']) {
|
107 |
$page = $_GET['ec-page'];
|
108 |
}
|
176 |
if (ecwid_test_oauth(true)) {
|
177 |
require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
|
178 |
} else {
|
179 |
+
require_once ECWID_PLUGIN_DIR . 'templates/admin/simple-dashboard.php';
|
180 |
}
|
181 |
} else {
|
182 |
require_once ECWID_PLUGIN_DIR . 'templates/ecwid-admin.php';
|
@@ -58,7 +58,7 @@ class Ecwid_Admin_UI_Framework
|
|
58 |
'ec-store-help'
|
59 |
);
|
60 |
|
61 |
-
if( ecwid_is_demo_store() || isset($_GET['reconnect']) ) {
|
62 |
$pages[] = 'ec-store';
|
63 |
}
|
64 |
|
58 |
'ec-store-help'
|
59 |
);
|
60 |
|
61 |
+
if( ecwid_is_demo_store() || isset($_GET['reconnect']) || Ecwid_Api_V3::get_token() == false ) {
|
62 |
$pages[] = 'ec-store';
|
63 |
}
|
64 |
|
@@ -29,18 +29,24 @@ class Ecwid_Message_Manager
|
|
29 |
if (!$wp_remote_post_error) {
|
30 |
$message = sprintf(
|
31 |
__( <<<TXT
|
32 |
-
Sorry, there is a problem. This page is supposed to display your store control panel. But this WordPress site doesn't seem to be able to connect to the
|
33 |
<br /><br />
|
34 |
-
Here is a more techy description of the problem, please send it to your hosting provider: "The WordPress function wp_remote_post() failed to connect a remote server because of some error. Seems like HTTP requests to remote servers are disabled on this server. Specifically, the requests to
|
35 |
<br /><br />
|
36 |
-
Please also feel free to contact us at <a %s
|
37 |
<br /><br />
|
38 |
-
Meanwhile, to manage your store, you can use the
|
39 |
TXT
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
'href="' . Ecwid_Store_Page::get_store_url() . '" target="_blank"',
|
45 |
Ecwid_Store_Page::get_store_url()
|
46 |
);
|
@@ -269,7 +275,10 @@ TXT
|
|
269 |
),
|
270 |
|
271 |
'no_oauth' => array(
|
272 |
-
|
|
|
|
|
|
|
273 |
'message' => Ecwid_Message_Manager::get_oauth_message(),
|
274 |
'hideable' => false,
|
275 |
'type' => 'error'
|
@@ -377,10 +386,11 @@ HTML
|
|
377 |
case 'no_token':
|
378 |
$no_token = Ecwid_Api_V3::get_token() == false;
|
379 |
$is_not_demo = !ecwid_is_demo_store();
|
|
|
380 |
return
|
381 |
$no_token
|
382 |
&& $is_not_demo
|
383 |
-
&& !$is_ecwid_menu
|
384 |
&& in_array(
|
385 |
Ecwid_Api_V3::get_api_status(),
|
386 |
array(
|
@@ -438,11 +448,21 @@ HTML
|
|
438 |
&& time() - get_option( 'ecwid_connected_via_legacy_page_time' ) > 15 * MINUTE_IN_SECONDS;
|
439 |
|
440 |
case 'api_failed_other':
|
441 |
-
return
|
442 |
!ecwid_is_demo_store()
|
443 |
&& get_current_screen()->parent_base == Ecwid_Admin::ADMIN_SLUG
|
444 |
&& Ecwid_Api_V3::get_api_status() == Ecwid_Api_V3::API_STATUS_ERROR_OTHER
|
445 |
&& time() - get_option( 'ecwid_connected_via_legacy_page_time' ) > 15 * MINUTE_IN_SECONDS;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
}
|
447 |
}
|
448 |
|
29 |
if (!$wp_remote_post_error) {
|
30 |
$message = sprintf(
|
31 |
__( <<<TXT
|
32 |
+
Sorry, there is a problem. This page is supposed to display your store control panel. But this WordPress site doesn't seem to be able to connect to the %s server, that's why there is no dashboard. This is caused by your server misconfiguration and can be fixed by your hosting provider.
|
33 |
<br /><br />
|
34 |
+
Here is a more techy description of the problem, please send it to your hosting provider: "The WordPress function wp_remote_post() failed to connect a remote server because of some error. Seems like HTTP requests to remote servers are disabled on this server. Specifically, the requests to %s and %s are blocked.".
|
35 |
<br /><br />
|
36 |
+
Please also feel free to contact us at <a %s">%s</a> and we will help you handle it with your hosting.
|
37 |
<br /><br />
|
38 |
+
Meanwhile, to manage your store, you can use the %s Control Panel at <a %s>%s</a>. Your store front is working fine as well and you can check it here: <a %s>%s</a>.
|
39 |
TXT
|
40 |
|
41 |
+
),
|
42 |
+
Ecwid_Config::get_brand(),
|
43 |
+
Ecwid_Config::get_api_domain(),
|
44 |
+
Ecwid_Config::get_cpanel_domain(),
|
45 |
+
'href="https://'. Ecwid_Config::get_contact_us_url() .'" target="_blank"',
|
46 |
+
Ecwid_Config::get_contact_us_url(),
|
47 |
+
Ecwid_Config::get_brand(),
|
48 |
+
'href="https://'. Ecwid_Config::get_cpanel_domain() .'" target="_blank"',
|
49 |
+
Ecwid_Config::get_cpanel_domain(),
|
50 |
'href="' . Ecwid_Store_Page::get_store_url() . '" target="_blank"',
|
51 |
Ecwid_Store_Page::get_store_url()
|
52 |
);
|
275 |
),
|
276 |
|
277 |
'no_oauth' => array(
|
278 |
+
'title' => __(
|
279 |
+
'Warning: some of your online store features are disabled. Please contact your hosting provider to resolve.',
|
280 |
+
'ecwid-shopping-cart'
|
281 |
+
),
|
282 |
'message' => Ecwid_Message_Manager::get_oauth_message(),
|
283 |
'hideable' => false,
|
284 |
'type' => 'error'
|
386 |
case 'no_token':
|
387 |
$no_token = Ecwid_Api_V3::get_token() == false;
|
388 |
$is_not_demo = !ecwid_is_demo_store();
|
389 |
+
|
390 |
return
|
391 |
$no_token
|
392 |
&& $is_not_demo
|
393 |
+
&& !$is_ecwid_menu
|
394 |
&& in_array(
|
395 |
Ecwid_Api_V3::get_api_status(),
|
396 |
array(
|
448 |
&& time() - get_option( 'ecwid_connected_via_legacy_page_time' ) > 15 * MINUTE_IN_SECONDS;
|
449 |
|
450 |
case 'api_failed_other':
|
451 |
+
return
|
452 |
!ecwid_is_demo_store()
|
453 |
&& get_current_screen()->parent_base == Ecwid_Admin::ADMIN_SLUG
|
454 |
&& Ecwid_Api_V3::get_api_status() == Ecwid_Api_V3::API_STATUS_ERROR_OTHER
|
455 |
&& time() - get_option( 'ecwid_connected_via_legacy_page_time' ) > 15 * MINUTE_IN_SECONDS;
|
456 |
+
|
457 |
+
case 'no_oauth':
|
458 |
+
global $ecwid_oauth;
|
459 |
+
|
460 |
+
return
|
461 |
+
!ecwid_is_demo_store()
|
462 |
+
&& get_current_screen()->parent_base == Ecwid_Admin::ADMIN_SLUG
|
463 |
+
&& get_current_screen()->base != 'ecwid_page_ec-storefront-settings'
|
464 |
+
&& Ecwid_Api_V3::get_token() == false
|
465 |
+
&& $ecwid_oauth->has_scope( 'allow_sso' );
|
466 |
}
|
467 |
}
|
468 |
|
@@ -118,6 +118,14 @@ class Ecwid_OAuth {
|
|
118 |
|| !isset( $result->access_token )
|
119 |
|| ( $result->token_type != 'Bearer' )
|
120 |
) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
return $this->trigger_auth_error($reconnect ? 'reconnect' : 'default');
|
122 |
}
|
123 |
|
118 |
|| !isset( $result->access_token )
|
119 |
|| ( $result->token_type != 'Bearer' )
|
120 |
) {
|
121 |
+
|
122 |
+
// detect cURL problem
|
123 |
+
if( $request->is_error ) {
|
124 |
+
if( strstr($request->error->get_error_message(), 'cURL error') !== false ){
|
125 |
+
$reconnect = 'true';
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
return $this->trigger_auth_error($reconnect ? 'reconnect' : 'default');
|
130 |
}
|
131 |
|
@@ -271,6 +271,13 @@ class Ecwid_Static_Page {
|
|
271 |
|
272 |
public static function is_enabled_static_home_page() {
|
273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
if( is_preview() ) {
|
275 |
return false;
|
276 |
}
|
271 |
|
272 |
public static function is_enabled_static_home_page() {
|
273 |
|
274 |
+
$api = new Ecwid_Api_V3();
|
275 |
+
$profile = $api->get_store_profile();
|
276 |
+
|
277 |
+
if( $profile->settings->closed ) {
|
278 |
+
return false;
|
279 |
+
}
|
280 |
+
|
281 |
if( is_preview() ) {
|
282 |
return false;
|
283 |
}
|
@@ -482,7 +482,12 @@ class Ecwid_Store_Page {
|
|
482 |
|
483 |
static public function set_store_url()
|
484 |
{
|
485 |
-
$
|
|
|
|
|
|
|
|
|
|
|
486 |
|
487 |
EcwidPlatform::cache_reset( Ecwid_Api_V3::PROFILE_CACHE_NAME );
|
488 |
|
482 |
|
483 |
static public function set_store_url()
|
484 |
{
|
485 |
+
$store_page_id = self::get_current_store_page_id();
|
486 |
+
if ( !$store_page_id ) {
|
487 |
+
return;
|
488 |
+
}
|
489 |
+
|
490 |
+
$store_url = self::get_store_url();
|
491 |
|
492 |
EcwidPlatform::cache_reset( Ecwid_Api_V3::PROFILE_CACHE_NAME );
|
493 |
|
@@ -36,7 +36,9 @@ class Ecwid_Integration_All_In_One_SEO_Pack
|
|
36 |
// Disable titles, descriptions and canonical link on ecwid _escaped_fragment_ pages
|
37 |
public function disable_seo_if_needed()
|
38 |
{
|
39 |
-
|
|
|
|
|
40 |
return;
|
41 |
}
|
42 |
|
@@ -47,15 +49,21 @@ class Ecwid_Integration_All_In_One_SEO_Pack
|
|
47 |
$is_escaped_fragment = array_key_exists('_escaped_fragment_', $_GET);
|
48 |
$is_seo_links_store_page = Ecwid_Seo_Links::is_enabled() && Ecwid_Seo_Links::is_product_browser_url();
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
if ( !$is_escaped_fragment && !$is_seo_links_store_page ) {
|
51 |
return;
|
52 |
}
|
53 |
|
54 |
-
global $aioseop_options;
|
55 |
-
|
56 |
$aioseop_options['aiosp_can'] = false;
|
57 |
add_filter( 'aioseop_title', '__return_null' );
|
58 |
add_filter( 'aioseop_description', '__return_null' );
|
|
|
59 |
}
|
60 |
|
61 |
// Hook that new sitemap type to aiosp sitemap
|
36 |
// Disable titles, descriptions and canonical link on ecwid _escaped_fragment_ pages
|
37 |
public function disable_seo_if_needed()
|
38 |
{
|
39 |
+
global $aioseop_options;
|
40 |
+
|
41 |
+
if (! Ecwid_Store_Page::is_store_page() ) {
|
42 |
return;
|
43 |
}
|
44 |
|
49 |
$is_escaped_fragment = array_key_exists('_escaped_fragment_', $_GET);
|
50 |
$is_seo_links_store_page = Ecwid_Seo_Links::is_enabled() && Ecwid_Seo_Links::is_product_browser_url();
|
51 |
|
52 |
+
$page_params = Ecwid_Store_Page::get_store_page_params();
|
53 |
+
$is_default_category_page = isset($page_params['default_category_id']) && $page_params['default_category_id'] > 0;
|
54 |
+
|
55 |
+
if( $is_default_category_page ) {
|
56 |
+
add_filter( 'ecwid_static_page_field_canonicalurl', '__return_false' );
|
57 |
+
}
|
58 |
+
|
59 |
if ( !$is_escaped_fragment && !$is_seo_links_store_page ) {
|
60 |
return;
|
61 |
}
|
62 |
|
|
|
|
|
63 |
$aioseop_options['aiosp_can'] = false;
|
64 |
add_filter( 'aioseop_title', '__return_null' );
|
65 |
add_filter( 'aioseop_description', '__return_null' );
|
66 |
+
add_filter( 'aioseop_disable_schema', '__return_true' );
|
67 |
}
|
68 |
|
69 |
// Hook that new sitemap type to aiosp sitemap
|
@@ -8,6 +8,8 @@ class Ecwid_Integration_Elementor extends Ecwid_Stub_Renderer {
|
|
8 |
parent::__construct();
|
9 |
|
10 |
$__ecwid_integration_elementor_widgets = new Ecwid_Integration_Elementor_Widgets();
|
|
|
|
|
11 |
}
|
12 |
|
13 |
protected function _should_apply() {
|
8 |
parent::__construct();
|
9 |
|
10 |
$__ecwid_integration_elementor_widgets = new Ecwid_Integration_Elementor_Widgets();
|
11 |
+
|
12 |
+
wp_enqueue_style('ec-elementor', ECWID_PLUGIN_URL . 'css/integrations/elementor.css', array(), get_option('ecwid_plugin_version'));
|
13 |
}
|
14 |
|
15 |
protected function _should_apply() {
|
@@ -68,9 +68,9 @@ function ecwid_apply_theme($theme_name = null)
|
|
68 |
'themify-music' => array( Ecwid_Theme_Base::PROP_AJAX_DEFER_RENDERING ),
|
69 |
'bridge' => array( Ecwid_Theme_Base::PROP_AJAX_DEFER_RENDERING ),
|
70 |
'Parallax-One' => array( 'css' ),
|
71 |
-
'twentytwenty' => array( 'css' ),
|
72 |
'jevelin3' => array( 'css-no-parent' ),
|
73 |
-
'newstore' => array( 'css' )
|
74 |
);
|
75 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
76 |
|
68 |
'themify-music' => array( Ecwid_Theme_Base::PROP_AJAX_DEFER_RENDERING ),
|
69 |
'bridge' => array( Ecwid_Theme_Base::PROP_AJAX_DEFER_RENDERING ),
|
70 |
'Parallax-One' => array( 'css' ),
|
71 |
+
'twentytwenty' => array( 'css', 'title' ),
|
72 |
'jevelin3' => array( 'css-no-parent' ),
|
73 |
+
'newstore' => array( 'css', 'title' )
|
74 |
);
|
75 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
76 |
|
@@ -66,6 +66,15 @@ class Ecwid_Theme_Base {
|
|
66 |
add_filter( Ecwid_Ajax_Defer_Renderer::FILTER_ENABLED, '__return_true' );
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
return $theme;
|
70 |
}
|
71 |
|
66 |
add_filter( Ecwid_Ajax_Defer_Renderer::FILTER_ENABLED, '__return_true' );
|
67 |
}
|
68 |
|
69 |
+
if ( in_array( 'title', $props, true ) ) {
|
70 |
+
|
71 |
+
$store_page_params = Ecwid_Store_Page::get_store_page_params();
|
72 |
+
|
73 |
+
if( @$store_page_params['product_details_show_product_name'] ) {
|
74 |
+
add_filter( 'option_' . Ecwid_Store_Page::OPTION_REPLACE_TITLE, '__return_false' );
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
return $theme;
|
79 |
}
|
80 |
|
@@ -97,6 +97,11 @@ function ecwidApplyIframeAdminMenu($link, menu) {
|
|
97 |
var slug = jQuery(this).data('ecwid-menu-slug');
|
98 |
|
99 |
if( slug == 'ec-storefront-settings' ) {
|
|
|
|
|
|
|
|
|
|
|
100 |
jQuery('#ec-storefront-settings').show();
|
101 |
jQuery('#ecwid-frame').hide();
|
102 |
|
@@ -104,6 +109,11 @@ function ecwidApplyIframeAdminMenu($link, menu) {
|
|
104 |
} else {
|
105 |
|
106 |
if( ec_admin_prev_slug == '' || ec_admin_prev_slug == slug ) {
|
|
|
|
|
|
|
|
|
|
|
107 |
jQuery('#ecwid-frame').show();
|
108 |
jQuery('#ec-storefront-settings').hide();
|
109 |
|
97 |
var slug = jQuery(this).data('ecwid-menu-slug');
|
98 |
|
99 |
if( slug == 'ec-storefront-settings' ) {
|
100 |
+
|
101 |
+
if( !jQuery('#ecwid-frame').length ) {
|
102 |
+
location.href = jQuery(this).attr('href');
|
103 |
+
}
|
104 |
+
|
105 |
jQuery('#ec-storefront-settings').show();
|
106 |
jQuery('#ecwid-frame').hide();
|
107 |
|
109 |
} else {
|
110 |
|
111 |
if( ec_admin_prev_slug == '' || ec_admin_prev_slug == slug ) {
|
112 |
+
|
113 |
+
if( !jQuery('#ecwid-frame').length ) {
|
114 |
+
location.href = jQuery(this).attr('href');
|
115 |
+
}
|
116 |
+
|
117 |
jQuery('#ecwid-frame').show();
|
118 |
jQuery('#ec-storefront-settings').hide();
|
119 |
|
@@ -468,7 +468,8 @@ class Ecwid_Api_V3
|
|
468 |
$query['redirect_uri'] = $redirect_uri;
|
469 |
$query['response_type'] = 'code';
|
470 |
$query['scope'] = $scope;
|
471 |
-
|
|
|
472 |
$query['partner'] = Ecwid_Config::get_channel_id();
|
473 |
}
|
474 |
|
468 |
$query['redirect_uri'] = $redirect_uri;
|
469 |
$query['response_type'] = 'code';
|
470 |
$query['scope'] = $scope;
|
471 |
+
|
472 |
+
if ( Ecwid_Config::get_channel_id() && !Ecwid_Config::is_wl() ) {
|
473 |
$query['partner'] = Ecwid_Config::get_channel_id();
|
474 |
}
|
475 |
|
@@ -5,7 +5,6 @@ abstract class Ecwid_Http {
|
|
5 |
protected $name = '';
|
6 |
protected $url = '';
|
7 |
protected $policies;
|
8 |
-
protected $is_error = false;
|
9 |
protected $error_message = '';
|
10 |
protected $raw_result;
|
11 |
protected $processed_data;
|
@@ -14,7 +13,9 @@ abstract class Ecwid_Http {
|
|
14 |
protected $code;
|
15 |
protected $message;
|
16 |
protected $headers;
|
17 |
-
|
|
|
|
|
18 |
|
19 |
const TRANSPORT_CHECK_EXPIRATION = 86400;
|
20 |
|
5 |
protected $name = '';
|
6 |
protected $url = '';
|
7 |
protected $policies;
|
|
|
8 |
protected $error_message = '';
|
9 |
protected $raw_result;
|
10 |
protected $processed_data;
|
13 |
protected $code;
|
14 |
protected $message;
|
15 |
protected $headers;
|
16 |
+
|
17 |
+
public $is_error = false;
|
18 |
+
public $error;
|
19 |
|
20 |
const TRANSPORT_CHECK_EXPIRATION = 86400;
|
21 |
|
@@ -3,7 +3,7 @@ Contributors: Ecwid
|
|
3 |
Tags: ecommerce, e-commerce, storefront, online store, sell
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.4
|
6 |
-
Stable tag: 6.9.
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
@@ -154,8 +154,11 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
154 |
|
155 |
== Changelog ==
|
156 |
|
157 |
-
= 6.9.
|
158 |
|
159 |
-
-
|
|
|
|
|
|
|
160 |
|
161 |
[See full changelog](https://raw.githubusercontent.com/Ecwid/ecwid-wordpress-plugin/master/CHANGELOG.txt)
|
3 |
Tags: ecommerce, e-commerce, storefront, online store, sell
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.4
|
6 |
+
Stable tag: 6.9.6
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
154 |
|
155 |
== Changelog ==
|
156 |
|
157 |
+
= 6.9.6 - May 14, 2020 =
|
158 |
|
159 |
+
- Improve compatibility with the Elementor page builder plugin. Ecwid storefronts on Elementor-powered websites loaded slowly on devices with an old iOS version (less than 13.3.1). We fixed it and now stores should work well.
|
160 |
+
- Better warning messages for the site administrator about the hosting connection issues. Some hosting do not allow WordPress plugins connect external services and APIs in their code. That might be because of a hosting server misconfiguration or a tricky firewall setup. Good news is that the Ecwid plugin would work well even in such environment — you can add a store to your ecommerce site pages and sell. But some of the plugin feature would be disabled. For example, SEO tools wouldn't work and the embedded store control panel wouldn't show. We added extra warning messages and fallbacks to the plugin code to better handle such situations. If you face such a problem, we recommend contacting your hosting provider to make sure your server can connect the Ecwid API.
|
161 |
+
- Minor improvements for Twenty Twenty and NewShop themes.
|
162 |
+
- Minor fixes and improvements.
|
163 |
|
164 |
[See full changelog](https://raw.githubusercontent.com/Ecwid/ecwid-wordpress-plugin/master/CHANGELOG.txt)
|
@@ -10,41 +10,9 @@
|
|
10 |
</div>
|
11 |
|
12 |
<?php
|
13 |
-
|
14 |
-
|
15 |
-
$note = sprintf(
|
16 |
-
__( 'To display your store on this site, you need to allow WordPress to access your %1$s products. Please press connect to provide permission.', 'ecwid-shopping-cart' ),
|
17 |
-
Ecwid_Config::get_brand()
|
18 |
-
);
|
19 |
-
|
20 |
-
echo $this->get_welcome_page_note( $note );
|
21 |
-
|
22 |
-
} else {
|
23 |
-
|
24 |
-
$error_note = __( 'Connection error - after clicking button you need to login and accept permissions to use our plugin. Please, try again.', 'ecwid-shopping-cart' );
|
25 |
-
|
26 |
-
$oauth_error = $ecwid_oauth->get_error();
|
27 |
-
|
28 |
-
if( !empty($oauth_error) ) {
|
29 |
-
if ($ecwid_oauth->get_error() == 'other') {
|
30 |
-
|
31 |
-
$error_note = sprintf( __( 'Looks like your site does not support remote POST requests that are required for %s API to work. Please, contact your hosting provider to enable cURL.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() );
|
32 |
-
} else {
|
33 |
-
|
34 |
-
$error_note = sprintf( __( 'To sell using %1$s, you must allow WordPress to access the %1$s plugin. The connect button will direct you to your %1$s account where you can provide permission.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() );
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
echo $this->get_welcome_page_note( $error_note, 'ec-connection-error' );
|
39 |
-
}
|
40 |
-
|
41 |
-
if( $ecwid_oauth->get_reconnect_message() ) {
|
42 |
-
echo $this->get_welcome_page_note( $ecwid_oauth->get_reconnect_message() );
|
43 |
-
}
|
44 |
-
|
45 |
?>
|
46 |
|
47 |
-
|
48 |
<?php
|
49 |
require_once ECWID_ADMIN_TEMPLATES_DIR . '/welcome-terms-privacy.php';
|
50 |
?>
|
10 |
</div>
|
11 |
|
12 |
<?php
|
13 |
+
require_once ECWID_ADMIN_TEMPLATES_DIR . '/welcome-connection-message.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
?>
|
15 |
|
|
|
16 |
<?php
|
17 |
require_once ECWID_ADMIN_TEMPLATES_DIR . '/welcome-terms-privacy.php';
|
18 |
?>
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if( !$connection_error ) {
|
3 |
+
|
4 |
+
$note = sprintf(
|
5 |
+
__( 'To display your store on this site, you need to allow WordPress to access your %1$s products. Please press connect to provide permission.', 'ecwid-shopping-cart' ),
|
6 |
+
Ecwid_Config::get_brand()
|
7 |
+
);
|
8 |
+
|
9 |
+
if( $state == 'connect' ) {
|
10 |
+
echo $this->get_welcome_page_note( $note );
|
11 |
+
}
|
12 |
+
|
13 |
+
} else {
|
14 |
+
|
15 |
+
$error_note = __( 'Connection error - after clicking button you need to login and provide permissions to use our plugin. Please, try again.', 'ecwid-shopping-cart' );
|
16 |
+
|
17 |
+
$oauth_error = $ecwid_oauth->get_error();
|
18 |
+
|
19 |
+
if( !empty($oauth_error) ) {
|
20 |
+
if ($ecwid_oauth->get_error() == 'other') {
|
21 |
+
|
22 |
+
$error_note = sprintf( __( 'Looks like your site does not support remote POST requests that are required for %s API to work. Please, contact your hosting provider to enable cURL.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() );
|
23 |
+
} else {
|
24 |
+
|
25 |
+
$error_note = sprintf( __( 'To sell using %1$s, you must allow WordPress to access the %1$s plugin. The connect button will direct you to your %1$s account where you can provide permission.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() );
|
26 |
+
}
|
27 |
+
} else if( !ecwid_test_oauth() ) {
|
28 |
+
$error_note = sprintf( __( 'Looks like your site does not support remote POST requests that are required for %s API to work. Please, contact your hosting provider to enable cURL.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() );
|
29 |
+
}
|
30 |
+
|
31 |
+
echo $this->get_welcome_page_note( $error_note, 'ec-connection-error' );
|
32 |
+
}
|
33 |
+
|
34 |
+
if( $ecwid_oauth->get_reconnect_message() ) {
|
35 |
+
echo $this->get_welcome_page_note( $ecwid_oauth->get_reconnect_message() );
|
36 |
+
}
|
37 |
+
|
38 |
+
?>
|
@@ -11,6 +11,10 @@
|
|
11 |
<?php _e('Your store has been created. Preparing your store dashboard ...', 'ecwid-shopping-cart'); ?>
|
12 |
</div>
|
13 |
|
|
|
|
|
|
|
|
|
14 |
<?php
|
15 |
require_once ECWID_ADMIN_TEMPLATES_DIR . '/welcome-terms-privacy.php';
|
16 |
?>
|
11 |
<?php _e('Your store has been created. Preparing your store dashboard ...', 'ecwid-shopping-cart'); ?>
|
12 |
</div>
|
13 |
|
14 |
+
<?php
|
15 |
+
require_once ECWID_ADMIN_TEMPLATES_DIR . '/welcome-connection-message.php';
|
16 |
+
?>
|
17 |
+
|
18 |
<?php
|
19 |
require_once ECWID_ADMIN_TEMPLATES_DIR . '/welcome-terms-privacy.php';
|
20 |
?>
|