From f1c1947d71b05432cd2c8b1aba1a41ddd0226c44 Mon Sep 17 00:00:00 2001 From: Ilnur Basyrov Date: Mon, 16 Jun 2025 17:15:00 +0400 Subject: [PATCH 1/5] PLUGINS-6313 Fixed issue "2" added to links --- includes/class-ecwid-seo-links.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/class-ecwid-seo-links.php b/includes/class-ecwid-seo-links.php index 25626021..968ee47b 100644 --- a/includes/class-ecwid-seo-links.php +++ b/includes/class-ecwid-seo-links.php @@ -216,6 +216,12 @@ public function slug_matches_seo_pattern( $slug ) { if ( ! $pattern ) { $patterns = self::get_seo_links_patterns(); + $index = array_search( '.*', $patterns, true ); + if ( $index !== false ) { + unset( $patterns[$index] ); + $patterns = array_values( $patterns ); + } + $pattern = '!(^' . implode( '$|^', $patterns ) . '$)!'; } From 1c10d0efd7efef0f80617460af89c1e2ccb394fc Mon Sep 17 00:00:00 2001 From: Ilnur Basyrov Date: Mon, 16 Jun 2025 17:36:13 +0400 Subject: [PATCH 2/5] PLUGINS-6313 Added check for empty array --- includes/class-ecwid-seo-links.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-ecwid-seo-links.php b/includes/class-ecwid-seo-links.php index 968ee47b..5e3c9300 100644 --- a/includes/class-ecwid-seo-links.php +++ b/includes/class-ecwid-seo-links.php @@ -222,6 +222,10 @@ public function slug_matches_seo_pattern( $slug ) { $patterns = array_values( $patterns ); } + if (empty($patterns)) { + return false; + } + $pattern = '!(^' . implode( '$|^', $patterns ) . '$)!'; } From 394b77771fe43289f6f813cf55858b8468ff7026 Mon Sep 17 00:00:00 2001 From: Ilnur Basyrov Date: Mon, 16 Jun 2025 17:39:52 +0400 Subject: [PATCH 3/5] PLUGINS-6313 --- includes/class-ecwid-seo-links.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-ecwid-seo-links.php b/includes/class-ecwid-seo-links.php index 5e3c9300..5bfba9d7 100644 --- a/includes/class-ecwid-seo-links.php +++ b/includes/class-ecwid-seo-links.php @@ -216,6 +216,7 @@ public function slug_matches_seo_pattern( $slug ) { if ( ! $pattern ) { $patterns = self::get_seo_links_patterns(); + // The '.*' pattern is deleted because it will always be triggered. $index = array_search( '.*', $patterns, true ); if ( $index !== false ) { unset( $patterns[$index] ); From 8212b3c5604cb8b18ec4b0ea2b9bd7f52984e97a Mon Sep 17 00:00:00 2001 From: Ilnur Basyrov Date: Mon, 16 Jun 2025 17:45:56 +0400 Subject: [PATCH 4/5] PLUGINS-6313 --- includes/class-ecwid-seo-links.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-ecwid-seo-links.php b/includes/class-ecwid-seo-links.php index 5bfba9d7..bbd8d838 100644 --- a/includes/class-ecwid-seo-links.php +++ b/includes/class-ecwid-seo-links.php @@ -223,7 +223,7 @@ public function slug_matches_seo_pattern( $slug ) { $patterns = array_values( $patterns ); } - if (empty($patterns)) { + if ( empty( $patterns ) ) { return false; } From f4408dea3bc021121eea4da7d2f9e0006a5cd092 Mon Sep 17 00:00:00 2001 From: Ilnur Basyrov Date: Mon, 16 Jun 2025 17:51:44 +0400 Subject: [PATCH 5/5] v 7.0.2 --- CHANGELOG.txt | 3 +++ ecwid-shopping-cart.php | 2 +- readme.txt | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ea6e2fc6..d912f456 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,7 @@ == Changelog == += 7.0.2 - Jun 17, 2025 = +- Fixed an issue where a "2" was incorrectly appended to page slugs when the "URLs without ID" feature was enabled. + = 7.0.1 - Apr 8, 2025 = - **WordPress 6.8 compatibility.** The new WordPress version will be released soon. The Ecwid ecommerce shopping cart plugin is ready for the new release — everything works well in your WordPress admin and storefront pages. Feel free to upgrade your site to WordPress 6.8. - **Improved security when handling Gutenberg block params. Ecwid ecommerce shopping cart plugin update recommended.** diff --git a/ecwid-shopping-cart.php b/ecwid-shopping-cart.php index dc7de54a..11665acd 100644 --- a/ecwid-shopping-cart.php +++ b/ecwid-shopping-cart.php @@ -5,7 +5,7 @@ Description: Ecwid by Lightspeed is a full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up. Text Domain: ecwid-shopping-cart Author: Ecwid Ecommerce -Version: 7.0.1 +Version: 7.0.2 Author URI: https://ecwid.to/ecwid-site License: GPLv2 or later */ diff --git a/readme.txt b/readme.txt index c807fdbd..3b852aaf 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Requires at least: 4.4 Tested up to: 6.8 -Stable tag: 7.0.1 +Stable tag: 7.0.2 Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. @@ -153,6 +153,9 @@ You can use Ecwid’s built-in import tools to copy your store products from any * [Ecwid Help Center](http://help.ecwid.com "Ecwid Help") == Changelog == += 7.0.2 - Jun 17, 2025 = +- Fixed an issue where a "2" was incorrectly appended to page slugs when the "URLs without ID" feature was enabled. + = 7.0.1 - Apr 8, 2025 = - **WordPress 6.8 compatibility.** The new WordPress version will be released soon. The Ecwid ecommerce shopping cart plugin is ready for the new release — everything works well in your WordPress admin and storefront pages. Feel free to upgrade your site to WordPress 6.8. - **Improved security when handling Gutenberg block params. Ecwid ecommerce shopping cart plugin update recommended.**