From 677b66760a5c41ebcce0ffc9bce53e605d6651c4 Mon Sep 17 00:00:00 2001 From: Dima <9010963+message-dimke@users.noreply.github.com> Date: Fri, 10 Nov 2023 07:26:20 +0200 Subject: [PATCH 1/3] Check feed_location to contain absolute url. --- src/Merchants.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Merchants.php b/src/Merchants.php index 2f83aa7b8..87f3e5b43 100644 --- a/src/Merchants.php +++ b/src/Merchants.php @@ -139,9 +139,13 @@ public static function update_or_create_merchant() { */ $merchant_name = apply_filters( 'pinterest_for_woocommerce_default_merchant_name', esc_html__( 'Auto-created by Pinterest for WooCommerce', 'pinterest-for-woocommerce' ) ); + // Check if the feed location is a full URL or a relative path and build the feed location accordingly. + $feed_location = parse_url( $config['feed_url'] ); + $feed_location = ! empty( $feed_location['host'] ) ? $config['feed_url'] : get_home_url() . $feed_location['path']; + $args = array( 'merchant_domains' => get_home_url(), - 'feed_location' => $config['feed_url'], + 'feed_location' => $feed_location, 'feed_format' => 'XML', 'country' => Pinterest_For_Woocommerce()::get_base_country() ?? 'US', 'locale' => LocaleMapper::get_locale_for_api(), From 721565d3eb7d04b29c00b151f8e986efbd6fa469 Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Wed, 13 Dec 2023 09:35:14 +0100 Subject: [PATCH 2/3] Product version bump update --- package-lock.json | 2 +- package.json | 2 +- pinterest-for-woocommerce.php | 4 ++-- readme.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86bea0a93..552e0769c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pinterest-for-woocommerce", - "version": "1.3.15", + "version": "1.3.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 39b7ae981..4f271d041 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "pinterest-for-woocommerce", "title": "Pinterest for WooCommerce", "description": "Pinterest for WooCommerce", - "version": "1.3.15", + "version": "1.3.16", "main": "gulpfile.js", "repository": { "type": "git", diff --git a/pinterest-for-woocommerce.php b/pinterest-for-woocommerce.php index 6e727c2c7..359f10b63 100644 --- a/pinterest-for-woocommerce.php +++ b/pinterest-for-woocommerce.php @@ -13,7 +13,7 @@ * Plugin Name: Pinterest for WooCommerce * Plugin URI: https://woo.com/products/pinterest-for-woocommerce/ * Description: Grow your business on Pinterest! Use this official plugin to allow shoppers to Pin products while browsing your store, track conversions, and advertise on Pinterest. - * Version: 1.3.15 + * Version: 1.3.16 * Author: WooCommerce * Author URI: https://woo.com * License: GPL-2.0+ @@ -46,7 +46,7 @@ } define( 'PINTEREST_FOR_WOOCOMMERCE_PLUGIN_FILE', __FILE__ ); -define( 'PINTEREST_FOR_WOOCOMMERCE_VERSION', '1.3.15' ); // WRCS: DEFINED_VERSION. +define( 'PINTEREST_FOR_WOOCOMMERCE_VERSION', '1.3.16' ); // WRCS: DEFINED_VERSION. // HPOS compatibility declaration. add_action( diff --git a/readme.txt b/readme.txt index f6332fda6..f7ae86e84 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: woocommerce, pinterest, advertise Requires at least: 5.6 Tested up to: 6.4 Requires PHP: 7.3 -Stable tag: 1.3.15 +Stable tag: 1.3.16 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html From 28f15587804a9d389508ca36c93385a65f48ce7b Mon Sep 17 00:00:00 2001 From: Bartosz Budzanowski Date: Wed, 13 Dec 2023 09:35:19 +0100 Subject: [PATCH 3/3] Changelog update --- changelog.txt | 3 +++ readme.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/changelog.txt b/changelog.txt index 648a87b94..e6585ba1d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ *** Pinterest for WooCommerce Changelog *** += 1.3.16 - 2023-12-13 = +* Tweak - Make sure `feed_location` has a full URL. + = 1.3.15 - 2023-11-28 = * Add - Compatibility with the Cart and Checkout blocks. diff --git a/readme.txt b/readme.txt index f7ae86e84..72c883f90 100644 --- a/readme.txt +++ b/readme.txt @@ -91,6 +91,9 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](hhttps: == Changelog == += 1.3.16 - 2023-12-13 = +* Tweak - Make sure `feed_location` has a full URL. + = 1.3.15 - 2023-11-28 = * Add - Compatibility with the Cart and Checkout blocks.