Version Description
- Feb 7, 2019 =
- Fixes for the Open Graph image tag (og:image tag) . When you share a page from your ecommerce site on Facebook or in a messenger, you should see the product title, description and image in the sharing preview snippet.
- Improvements for the product listing auto-scroll function. In some Wordpress themes, the site header might overlap product pages when you navigate from page to page in your online store. We improved it to make the product and category pages appear better to your customers.
- Various minor fixes and improvements.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 6.4.9 |
Comparing to | |
See all releases |
Code changes from version 6.4.10 to 6.4.9
- ecwid-shopping-cart.php +2 -56
- js/frontend.js +0 -26
- js/store-editor-page.js +7 -11
- lib/ecwid_api_v3.php +5 -5
- readme.txt +2 -6
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 Ecommerce
|
8 |
-
Version: 6.4.
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
*/
|
11 |
|
@@ -64,7 +64,6 @@ if ( is_admin() ){
|
|
64 |
add_action('wp_ajax_ecwid_sync_products', 'ecwid_sync_products');
|
65 |
add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
|
66 |
add_action('init', 'ecwid_apply_theme', 0);
|
67 |
-
add_action('init', 'ecwid_maybe_remove_emoji');
|
68 |
add_action('get_footer', 'ecwid_admin_get_footer');
|
69 |
add_action('admin_post_ec_connect', 'ecwid_admin_post_connect');
|
70 |
add_filter('tiny_mce_before_init', 'ecwid_tinymce_init');
|
@@ -94,7 +93,6 @@ if ( is_admin() ){
|
|
94 |
add_filter('body_class', 'ecwid_body_class');
|
95 |
add_action('redirect_canonical', 'ecwid_redirect_canonical', 10, 2 );
|
96 |
add_action('init', 'ecwid_check_api_cache');
|
97 |
-
add_filter( 'the_title', 'ecwid_page_title' );
|
98 |
$ecwid_seo_title = '';
|
99 |
}
|
100 |
add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
|
@@ -293,13 +291,6 @@ function ecwid_ie8_fonts_inclusion()
|
|
293 |
HTML;
|
294 |
|
295 |
}
|
296 |
-
add_action( 'wp_head', 'ecwid_maybe_remove_emoji', 0 );
|
297 |
-
function ecwid_maybe_remove_emoji() {
|
298 |
-
|
299 |
-
if ( Ecwid_Store_page::is_store_page() && get_option( 'ecwid_remove_emoji' ) == 'Y' && strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0') !== false ) {
|
300 |
-
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
301 |
-
}
|
302 |
-
}
|
303 |
|
304 |
add_action('wp_ajax_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
|
305 |
add_action('wp_ajax_nopriv_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
|
@@ -697,11 +688,8 @@ function ecwid_check_version()
|
|
697 |
// Since 6.4.8
|
698 |
add_option( 'ecwid_hide_canonical', false );
|
699 |
|
700 |
-
// Since 6.4.9
|
701 |
-
add_option( Ecwid_Theme_Base::OPTION_LEGACY_CUSTOM_SCROLLER, false );
|
702 |
-
|
703 |
// Since 6.4.9+
|
704 |
-
add_option(
|
705 |
|
706 |
do_action( 'ecwid_on_plugin_update' );
|
707 |
|
@@ -1435,48 +1423,6 @@ function _ecwid_get_seo_title()
|
|
1435 |
return "";
|
1436 |
}
|
1437 |
|
1438 |
-
function ecwid_page_title( $title ) {
|
1439 |
-
|
1440 |
-
if ( ! Ecwid_Store_Page::is_store_page() ) return $title;
|
1441 |
-
|
1442 |
-
$sep = ecwid_get_title_separator();
|
1443 |
-
$title_placeholder = '@title@';
|
1444 |
-
$format = "$title_placeholder";
|
1445 |
-
$title_pattern = sprintf(
|
1446 |
-
'<span id="ecwid-main-page-title" data-original-title="%s" data-title-placeholder="%s" data-format="%s">%%s</span>',
|
1447 |
-
$title,
|
1448 |
-
$title_placeholder,
|
1449 |
-
$format
|
1450 |
-
);
|
1451 |
-
|
1452 |
-
$params = Ecwid_Seo_Links::maybe_extract_html_catalog_params();
|
1453 |
-
|
1454 |
-
if ( !@$params['mode'] ) {
|
1455 |
-
return sprintf( $title_pattern, $title );
|
1456 |
-
}
|
1457 |
-
|
1458 |
-
$ecwid_title = null;
|
1459 |
-
|
1460 |
-
if ( $params['mode'] == 'product' ) {
|
1461 |
-
$p = Ecwid_Product::get_by_id( $params['id'] );
|
1462 |
-
$ecwid_title = isset( $p->seoTitle ) ? $p->seoTitle : $p->name;
|
1463 |
-
} else if ( $params['mode'] == 'category' ) {
|
1464 |
-
$c = Ecwid_Category::get_by_id( $params['id'] );
|
1465 |
-
$ecwid_title = $c->name;
|
1466 |
-
}
|
1467 |
-
|
1468 |
-
if ( !empty( $ecwid_title ) ) {
|
1469 |
-
|
1470 |
-
|
1471 |
-
return sprintf(
|
1472 |
-
$title_pattern,
|
1473 |
-
esc_html( str_replace( $title_placeholder, $ecwid_title, $format ) )
|
1474 |
-
);
|
1475 |
-
}
|
1476 |
-
|
1477 |
-
return $title;
|
1478 |
-
}
|
1479 |
-
|
1480 |
add_filter('oembed_endpoint_url', 'ecwid_oembed_url', 10, 3);
|
1481 |
|
1482 |
function ecwid_oembed_url( $url, $permalink, $format ) {
|
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.4.9
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
*/
|
11 |
|
64 |
add_action('wp_ajax_ecwid_sync_products', 'ecwid_sync_products');
|
65 |
add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
|
66 |
add_action('init', 'ecwid_apply_theme', 0);
|
|
|
67 |
add_action('get_footer', 'ecwid_admin_get_footer');
|
68 |
add_action('admin_post_ec_connect', 'ecwid_admin_post_connect');
|
69 |
add_filter('tiny_mce_before_init', 'ecwid_tinymce_init');
|
93 |
add_filter('body_class', 'ecwid_body_class');
|
94 |
add_action('redirect_canonical', 'ecwid_redirect_canonical', 10, 2 );
|
95 |
add_action('init', 'ecwid_check_api_cache');
|
|
|
96 |
$ecwid_seo_title = '';
|
97 |
}
|
98 |
add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
|
291 |
HTML;
|
292 |
|
293 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
|
295 |
add_action('wp_ajax_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
|
296 |
add_action('wp_ajax_nopriv_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
|
688 |
// Since 6.4.8
|
689 |
add_option( 'ecwid_hide_canonical', false );
|
690 |
|
|
|
|
|
|
|
691 |
// Since 6.4.9+
|
692 |
+
add_option( Ecwid_Theme_Base::OPTION_LEGACY_CUSTOM_SCROLLER, false );
|
693 |
|
694 |
do_action( 'ecwid_on_plugin_update' );
|
695 |
|
1423 |
return "";
|
1424 |
}
|
1425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1426 |
add_filter('oembed_endpoint_url', 'ecwid_oembed_url', 10, 3);
|
1427 |
|
1428 |
function ecwid_oembed_url( $url, $permalink, $format ) {
|
js/frontend.js
CHANGED
@@ -37,30 +37,4 @@ jQuery(document).ready(function() {
|
|
37 |
};
|
38 |
|
39 |
ecwidShoppingCartMakeStoreLinksUseApiCall(jQuery("a[data-ecwid-page]"));
|
40 |
-
|
41 |
-
|
42 |
-
if ( jQuery('#ecwid-main-page-title').length > 0 ) {
|
43 |
-
Ecwid.OnPageLoaded.add(function(page) {
|
44 |
-
var isCategory = page.type == 'CATEGORY';
|
45 |
-
var isProduct = page.type == 'PRODUCT';
|
46 |
-
|
47 |
-
if ( !isCategory && !isProduct ) return;
|
48 |
-
|
49 |
-
var el = jQuery('#ecwid-main-page-title');
|
50 |
-
var format = el.attr('data-format');
|
51 |
-
var titlePlaceholder = el.attr('data-title-placeholder');
|
52 |
-
|
53 |
-
var newTitle = jQuery('title').html();
|
54 |
-
if ( !newTitle ) {
|
55 |
-
newTitle = "";
|
56 |
-
}
|
57 |
-
if ( isCategory && page.categoryId == 0 || newTitle.length == 0 ) {
|
58 |
-
var title = el.attr('data-original-title');
|
59 |
-
} else {
|
60 |
-
var title = format.replace( titlePlaceholder, jQuery('title').html() );
|
61 |
-
}
|
62 |
-
|
63 |
-
el.html( title );
|
64 |
-
});
|
65 |
-
}
|
66 |
});
|
37 |
};
|
38 |
|
39 |
ecwidShoppingCartMakeStoreLinksUseApiCall(jQuery("a[data-ecwid-page]"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
});
|
js/store-editor-page.js
CHANGED
@@ -1,9 +1,5 @@
|
|
1 |
var createGutenbergedShortcodeString;
|
2 |
|
3 |
-
function ecwidIsTinyMCEActive() {
|
4 |
-
return typeof tinyMCE != 'undefined' && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden();
|
5 |
-
}
|
6 |
-
|
7 |
jQuery(document).ready(function() {
|
8 |
$popup = jQuery('#ecwid-store-popup-content');
|
9 |
|
@@ -110,14 +106,14 @@ jQuery(document).ready(function() {
|
|
110 |
'minicart_layout': 'MiniAttachToProductBrowser'
|
111 |
}
|
112 |
}
|
113 |
-
|
114 |
/*
|
115 |
* Tests whether there is a valid store shortcode
|
116 |
*/
|
117 |
checkEcwid = function() {
|
118 |
|
119 |
var hasEcwid = false;
|
120 |
-
if (
|
121 |
content = tinyMCE.activeEditor.getBody();
|
122 |
|
123 |
hasEcwid = jQuery(content).find('.ecwid-store-editor').length > 0;
|
@@ -130,7 +126,7 @@ jQuery(document).ready(function() {
|
|
130 |
} else {
|
131 |
jQuery('.wp-media-buttons').removeClass('has-ecwid');
|
132 |
}
|
133 |
-
if (
|
134 |
var body = tinymce.activeEditor.dom.doc.body;
|
135 |
var button = tinymce.activeEditor.dom.select('#ecwid-edit-store-button');
|
136 |
|
@@ -280,12 +276,12 @@ jQuery(document).ready(function() {
|
|
280 |
jQuery('#content').val(
|
281 |
jQuery('#content').val().replace(stringToReplace, stringToInsert)
|
282 |
);
|
283 |
-
if (
|
284 |
jQuery(tinymce.activeEditor.getBody()).find('.ecwid-store-editor').attr('data-ecwid-shortcode', shortcode.shortcode.string());
|
285 |
}
|
286 |
} else {
|
287 |
|
288 |
-
if (
|
289 |
if ($popup.data('range')) {
|
290 |
tinymce.activeEditor.selection.setRng($popup.data('range'));
|
291 |
}
|
@@ -369,7 +365,7 @@ ecwid_open_store_popup = function() {
|
|
369 |
|
370 |
var shortcode;
|
371 |
|
372 |
-
if (
|
373 |
tinyMCE.activeEditor.save();
|
374 |
|
375 |
$popup.data('range', tinyMCE.activeEditor.selection.getRng());
|
@@ -409,7 +405,7 @@ ecwid_open_store_popup = function() {
|
|
409 |
|
410 |
updatePreview();
|
411 |
|
412 |
-
if (
|
413 |
tinyMCE.activeEditor.execCommand('SelectAll');
|
414 |
tinyMCE.activeEditor.selection.collapse(true);
|
415 |
}
|
1 |
var createGutenbergedShortcodeString;
|
2 |
|
|
|
|
|
|
|
|
|
3 |
jQuery(document).ready(function() {
|
4 |
$popup = jQuery('#ecwid-store-popup-content');
|
5 |
|
106 |
'minicart_layout': 'MiniAttachToProductBrowser'
|
107 |
}
|
108 |
}
|
109 |
+
|
110 |
/*
|
111 |
* Tests whether there is a valid store shortcode
|
112 |
*/
|
113 |
checkEcwid = function() {
|
114 |
|
115 |
var hasEcwid = false;
|
116 |
+
if (typeof tinyMCE != 'undefined' && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
|
117 |
content = tinyMCE.activeEditor.getBody();
|
118 |
|
119 |
hasEcwid = jQuery(content).find('.ecwid-store-editor').length > 0;
|
126 |
} else {
|
127 |
jQuery('.wp-media-buttons').removeClass('has-ecwid');
|
128 |
}
|
129 |
+
if (typeof tinymce != 'undefined' && tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
|
130 |
var body = tinymce.activeEditor.dom.doc.body;
|
131 |
var button = tinymce.activeEditor.dom.select('#ecwid-edit-store-button');
|
132 |
|
276 |
jQuery('#content').val(
|
277 |
jQuery('#content').val().replace(stringToReplace, stringToInsert)
|
278 |
);
|
279 |
+
if (tinyMCE.activeEditor) {
|
280 |
jQuery(tinymce.activeEditor.getBody()).find('.ecwid-store-editor').attr('data-ecwid-shortcode', shortcode.shortcode.string());
|
281 |
}
|
282 |
} else {
|
283 |
|
284 |
+
if (tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
|
285 |
if ($popup.data('range')) {
|
286 |
tinymce.activeEditor.selection.setRng($popup.data('range'));
|
287 |
}
|
365 |
|
366 |
var shortcode;
|
367 |
|
368 |
+
if (tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
|
369 |
tinyMCE.activeEditor.save();
|
370 |
|
371 |
$popup.data('range', tinyMCE.activeEditor.selection.getRng());
|
405 |
|
406 |
updatePreview();
|
407 |
|
408 |
+
if (tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
|
409 |
tinyMCE.activeEditor.execCommand('SelectAll');
|
410 |
tinyMCE.activeEditor.selection.collapse(true);
|
411 |
}
|
lib/ecwid_api_v3.php
CHANGED
@@ -93,11 +93,6 @@ class Ecwid_Api_V3
|
|
93 |
{
|
94 |
$api = new Ecwid_Api_V3();
|
95 |
|
96 |
-
$token = self::_load_token();
|
97 |
-
if ( !$token ) {
|
98 |
-
return self::set_api_status( self::API_STATUS_ERROR_TOKEN );
|
99 |
-
}
|
100 |
-
|
101 |
$profile = $api->get_store_profile();
|
102 |
|
103 |
if ( $profile ) {
|
@@ -124,6 +119,11 @@ class Ecwid_Api_V3
|
|
124 |
if (-$tls_fails ) {
|
125 |
return self::set_api_status( self::API_STATUS_ERROR_TLS );
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
return self::set_api_status( self::API_STATUS_ERROR_OTHER );
|
129 |
}
|
93 |
{
|
94 |
$api = new Ecwid_Api_V3();
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
$profile = $api->get_store_profile();
|
97 |
|
98 |
if ( $profile ) {
|
119 |
if (-$tls_fails ) {
|
120 |
return self::set_api_status( self::API_STATUS_ERROR_TLS );
|
121 |
}
|
122 |
+
|
123 |
+
$token = self::_load_token();
|
124 |
+
if ( !$token ) {
|
125 |
+
return self::set_api_status( self::API_STATUS_ERROR_TOKEN );
|
126 |
+
}
|
127 |
|
128 |
return self::set_api_status( self::API_STATUS_ERROR_OTHER );
|
129 |
}
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: Ecwid
|
3 |
Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
|
4 |
Requires at least: 3.7
|
5 |
-
Tested up to: 5.
|
6 |
Stable tag: 6.4.9
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
@@ -150,12 +150,8 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
150 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
151 |
|
152 |
== Changelog ==
|
153 |
-
= 6.4.10 - Feb 12, 2019 =
|
154 |
-
- **SEO improvement for the H1 tags on the product and category pages**. Ecwid puts product and categories ecommerce data in the page content in a SEO-friendly ‘microdata’ format so that search engines can index your store well. On the other hand, Wordpress pages have their own data, specifically <h1> tags, which stay on product pages and visible to Google when it is indexing your site. So, in addition to a product title like “My cool product”, Google may see your store page title on the same page like “Shop”. We improved it — the product pages will now have more prominent and clear <h1> tags containing product title only. This should improve indexation and the way your products look in the search results in Google.
|
155 |
-
- Minor fixes and improvements.
|
156 |
-
|
157 |
= 6.4.9 - Feb 7, 2019 =
|
158 |
-
- **Fixes for the Open Graph image tag (og:image tag).** When you share a page from your ecommerce site on Facebook or in a messenger, you should see the product title, description and image in the sharing preview snippet.
|
159 |
- **Improvements for the product listing auto-scroll function.** In some Wordpress themes, the site header might overlap product pages when you navigate from page to page in your online store. We improved it to make the product and category pages appear better to your customers.
|
160 |
- Various minor fixes and improvements.
|
161 |
|
2 |
Contributors: Ecwid
|
3 |
Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
|
4 |
Requires at least: 3.7
|
5 |
+
Tested up to: 5.1
|
6 |
Stable tag: 6.4.9
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
150 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
151 |
|
152 |
== Changelog ==
|
|
|
|
|
|
|
|
|
153 |
= 6.4.9 - Feb 7, 2019 =
|
154 |
+
- **Fixes for the Open Graph image tag (og:image tag) .** When you share a page from your ecommerce site on Facebook or in a messenger, you should see the product title, description and image in the sharing preview snippet.
|
155 |
- **Improvements for the product listing auto-scroll function.** In some Wordpress themes, the site header might overlap product pages when you navigate from page to page in your online store. We improved it to make the product and category pages appear better to your customers.
|
156 |
- Various minor fixes and improvements.
|
157 |
|