Ecwid Ecommerce Shopping Cart - Version 6.10.5

Version Description

  • Aug 27, 2020 =
  • Fixes for the Open Graph title tags (og:title and twitter:title tags). When you shared a link to a page of your store in social networks, the link preview could have a wrong title, we fixed it.
  • Improved automatic cleanup of the plugin cache. The Ecwid plugin stores your products data on cloud servers, so the plugin shouldn't take a lot of space on your site server. However some users observed a database table overflow with the plugin cache. That happens in rare cases when the plugin data is not cleaned up properly by Wordpress. We improved automatic cleanup of the plugin cache. The problem should be solved now.

See full changelog

Download this release

Release Info

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

Code changes from version 6.10.4 to 6.10.5

ecwid-shopping-cart.php CHANGED
@@ -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.10.4
9
  Author URI: https://ecwid.to/ecwid-site
10
  License: GPLv2 or later
11
  */
@@ -935,7 +935,6 @@ function ecwid_check_api_cache() {
935
 
936
  $last_cache = get_option('ecwid_last_api_cache_check');
937
 
938
-
939
  if (time() - $last_cache > HOUR_IN_SECONDS ) {
940
  ecwid_invalidate_cache();
941
  }
@@ -1003,6 +1002,13 @@ function ecwid_regular_cache_check()
1003
  EcwidPlatform::invalidate_profile_cache_from( strtotime( $stats->profileUpdated ) );
1004
  update_option( 'ecwid_last_api_cache_check', time() );
1005
  }
 
 
 
 
 
 
 
1006
  }
1007
  }
1008
 
@@ -1017,7 +1023,7 @@ function ecwid_full_cache_reset()
1017
  EcwidPlatform::cache_reset( 'all_categories' );
1018
  EcwidPlatform::cache_reset( 'nav_categories_posts' );
1019
 
1020
- Ecwid_Static_Page::clear_all_cache();
1021
 
1022
  $p = new Ecwid_Products();
1023
  $p->reset_dates();
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.10.5
9
  Author URI: https://ecwid.to/ecwid-site
10
  License: GPLv2 or later
11
  */
935
 
936
  $last_cache = get_option('ecwid_last_api_cache_check');
937
 
 
938
  if (time() - $last_cache > HOUR_IN_SECONDS ) {
939
  ecwid_invalidate_cache();
940
  }
1002
  EcwidPlatform::invalidate_profile_cache_from( strtotime( $stats->profileUpdated ) );
1003
  update_option( 'ecwid_last_api_cache_check', time() );
1004
  }
1005
+
1006
+ $last_transients = get_option('ecwid_last_transients_check');
1007
+
1008
+ if (time() - $last_transients > MONTH_IN_SECONDS ) {
1009
+ EcwidPlatform::clear_all_transients();
1010
+ update_option( 'ecwid_last_transients_check', time() );
1011
+ }
1012
  }
1013
  }
1014
 
1023
  EcwidPlatform::cache_reset( 'all_categories' );
1024
  EcwidPlatform::cache_reset( 'nav_categories_posts' );
1025
 
1026
+ EcwidPlatform::clear_all_transients();
1027
 
1028
  $p = new Ecwid_Products();
1029
  $p->reset_dates();
includes/class-ecwid-static-page.php CHANGED
@@ -260,7 +260,16 @@ class Ecwid_Static_Page {
260
  }
261
 
262
  public static function get_og_tags_html() {
263
- return self::_get_data_field( 'ogTagsHtml' );
 
 
 
 
 
 
 
 
 
264
  }
265
 
266
  public static function get_json_ld_html() {
@@ -354,19 +363,6 @@ class Ecwid_Static_Page {
354
 
355
  return $api->is_store_feature_enabled( Ecwid_Api_V3::FEATURE_NEW_PRODUCT_LIST );
356
  }
357
-
358
- public static function clear_all_cache() {
359
- global $wpdb;
360
-
361
- $sql = "
362
- DELETE
363
- FROM {$wpdb->options}
364
- WHERE option_name like '\_transient\_ecwid\_catalog\_%'
365
- OR option_name like '\_transient\_timeout\_ecwid\_catalog\_%'
366
- ";
367
-
368
- $wpdb->query($sql);
369
- }
370
  }
371
 
372
  $__ecwid_static_page = new Ecwid_Static_Page();
260
  }
261
 
262
  public static function get_og_tags_html() {
263
+ $og_tags_html = self::_get_data_field( 'ogTagsHtml' );
264
+
265
+ $ec_title = self::get_title();
266
+ $wp_title = wp_get_document_title();
267
+
268
+ if( $og_tags_html && $wp_title && $ec_title ) {
269
+ $og_tags_html = str_replace( "content=\"$ec_title\"", "content=\"$wp_title\"", $og_tags_html);
270
+ }
271
+
272
+ return $og_tags_html;
273
  }
274
 
275
  public static function get_json_ld_html() {
363
 
364
  return $api->is_store_feature_enabled( Ecwid_Api_V3::FEATURE_NEW_PRODUCT_LIST );
365
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  }
367
 
368
  $__ecwid_static_page = new Ecwid_Static_Page();
lib/ecwid_platform.php CHANGED
@@ -534,6 +534,19 @@ class EcwidPlatform {
534
  $time = is_null( $time ) ? time() : $time;
535
  EcwidPlatform::set( self::FORCES_CATALOG_CACHE_RESET_VALID_FROM, $time );
536
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  }
538
 
539
  add_filter('http_api_transports', array('EcwidPlatform', 'http_api_transports'));
534
  $time = is_null( $time ) ? time() : $time;
535
  EcwidPlatform::set( self::FORCES_CATALOG_CACHE_RESET_VALID_FROM, $time );
536
  }
537
+
538
+ public static function clear_all_transients() {
539
+ global $wpdb;
540
+
541
+ $sql = "
542
+ DELETE
543
+ FROM {$wpdb->options}
544
+ WHERE option_name like '\_transient\_ecwid\_%'
545
+ OR option_name like '\_transient\_timeout\_ecwid\_%'
546
+ ";
547
+
548
+ $wpdb->query($sql);
549
+ }
550
  }
551
 
552
  add_filter('http_api_transports', array('EcwidPlatform', 'http_api_transports'));
readme.txt CHANGED
@@ -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.5
6
- Stable tag: 6.10.4
7
 
8
  Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
9
 
@@ -154,9 +154,8 @@ You can use Ecwid’s built-in import tools to copy your store products from any
154
 
155
  == Changelog ==
156
 
157
- = 6.10.4 - Aug 11, 2020 =
158
- - **Improvements for the integration with the Yoast SEO plugin.** There was a minor SEO issue with duplicates of the Open Graph tags on ecommerce store pages. The issue has been fixed and everything should work fine now.
159
- - **Integration with the New WordPress XML Sitemaps.** In WordPress 5.5, a new feature is being introduced that adds basic, extensible XML sitemaps functionality into WordPress core. Now, the sitemaps generated by WordPress will also include your online store pages.
160
- - Minor fixes and improvements.
161
 
162
  [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.5
6
+ Stable tag: 6.10.5
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.10.5 - Aug 27, 2020 =
158
+ - **Fixes for the Open Graph title tags (og:title and twitter:title tags).** When you shared a link to a page of your store in social networks, the link preview could have a wrong title, we fixed it.
159
+ - **Improved automatic cleanup of the plugin cache.** The Ecwid plugin stores your products data on cloud servers, so the plugin shouldn't take a lot of space on your site server. However some users observed a database table overflow with the plugin cache. That happens in rare cases when the plugin data is not cleaned up properly by Wordpress. We improved automatic cleanup of the plugin cache. The problem should be solved now.
 
160
 
161
  [See full changelog](https://raw.githubusercontent.com/Ecwid/ecwid-wordpress-plugin/master/CHANGELOG.txt)