From 465e821763d815e2ed48bc7cdcb2e29596bdacd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:58:35 +0000 Subject: [PATCH 1/3] Update version and add changelog entries for release 6.5.1 --- changelog.txt | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 5 ++++- woocommerce-payments.php | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index e440ee01f4f..4cd78d9d40e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,7 @@ *** WooPayments Changelog *** += 6.5.1 - 2023-09-27 = + = 6.5.0 - 2023-09-21 = * Add - Add a new task prompt to set up APMs after onboarding. Fixed an issue where a notice would show up in some unintended circumstances on the APM setup. * Add - Add an option on the Settings screen to enable merchants to migrate their Stripe Billing subscriptions to on-site billing. diff --git a/package-lock.json b/package-lock.json index ac730941806..185fe217534 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "woocommerce-payments", - "version": "6.5.0", + "version": "6.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "woocommerce-payments", - "version": "6.5.0", + "version": "6.5.1", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { diff --git a/package.json b/package.json index ff61db2c8d8..08ce1bc783b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woocommerce-payments", - "version": "6.5.0", + "version": "6.5.1", "main": "webpack.config.js", "author": "Automattic", "license": "GPL-3.0-or-later", diff --git a/readme.txt b/readme.txt index 9ab74e5a082..56d46eb213e 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: payment gateway, payment, apple pay, credit card, google pay, woocommerce Requires at least: 6.0 Tested up to: 6.2 Requires PHP: 7.3 -Stable tag: 6.5.0 +Stable tag: 6.5.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -94,6 +94,9 @@ Please note that our support for the checkout block is still experimental and th == Changelog == += 6.5.1 - 2023-09-27 = + + = 6.5.0 - 2023-09-21 = * Add - Add a new task prompt to set up APMs after onboarding. Fixed an issue where a notice would show up in some unintended circumstances on the APM setup. * Add - Add an option on the Settings screen to enable merchants to migrate their Stripe Billing subscriptions to on-site billing. diff --git a/woocommerce-payments.php b/woocommerce-payments.php index f2614acdbcb..457f5262caf 100644 --- a/woocommerce-payments.php +++ b/woocommerce-payments.php @@ -12,7 +12,7 @@ * WC tested up to: 7.8.0 * Requires at least: 6.0 * Requires PHP: 7.3 - * Version: 6.5.0 + * Version: 6.5.1 * * @package WooCommerce\Payments */ From 8f68e4d0109eaf0d37d49e045f6d5fe48785f49e Mon Sep 17 00:00:00 2001 From: Mike Moore Date: Tue, 26 Sep 2023 10:29:45 -0400 Subject: [PATCH 2/3] Fix incorrect payment method title (#7285) --- changelog/fix-7272-incorrect-payment-method-title | 4 ++++ includes/payment-methods/class-upe-payment-gateway.php | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 changelog/fix-7272-incorrect-payment-method-title diff --git a/changelog/fix-7272-incorrect-payment-method-title b/changelog/fix-7272-incorrect-payment-method-title new file mode 100644 index 00000000000..ad9fa07effe --- /dev/null +++ b/changelog/fix-7272-incorrect-payment-method-title @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +fix incorrect payment method title for non-WooPayments gateways diff --git a/includes/payment-methods/class-upe-payment-gateway.php b/includes/payment-methods/class-upe-payment-gateway.php index 60f0af9666e..339a90f91b1 100644 --- a/includes/payment-methods/class-upe-payment-gateway.php +++ b/includes/payment-methods/class-upe-payment-gateway.php @@ -1171,13 +1171,21 @@ public function maybe_filter_gateway_title( $title, $id ) { * @return void */ public function set_payment_method_title_for_email( $order ) { + $payment_gateway = wc_get_payment_gateway_by_order( $order ); + + if ( ! empty( $payment_gateway ) && self::GATEWAY_ID !== $payment_gateway->id || ! WC_Payments_Features::is_upe_legacy_enabled() ) { + return; + } + $payment_method_id = $this->order_service->get_payment_method_id_for_order( $order ); + if ( ! $payment_method_id ) { $order->set_payment_method_title( $this->title ); $order->save(); return; } + $payment_method_details = $this->payments_api_client->get_payment_method( $payment_method_id ); $payment_method_type = $this->get_payment_method_type_from_payment_details( $payment_method_details ); $this->set_payment_method_title_for_order( $order, $payment_method_type, $payment_method_details ); From 3b47e90489206bc9be1682ddf2df8e501117a76d Mon Sep 17 00:00:00 2001 From: botwoo Date: Tue, 26 Sep 2023 14:34:07 +0000 Subject: [PATCH 3/3] Amend changelog entries for release 6.5.1 --- changelog.txt | 3 ++- changelog/fix-7272-incorrect-payment-method-title | 4 ---- readme.txt | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 changelog/fix-7272-incorrect-payment-method-title diff --git a/changelog.txt b/changelog.txt index 4cd78d9d40e..760c80618f3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ *** WooPayments Changelog *** -= 6.5.1 - 2023-09-27 = += 6.5.1 - 2023-09-26 = +* Fix - fix incorrect payment method title for non-WooPayments gateways = 6.5.0 - 2023-09-21 = * Add - Add a new task prompt to set up APMs after onboarding. Fixed an issue where a notice would show up in some unintended circumstances on the APM setup. diff --git a/changelog/fix-7272-incorrect-payment-method-title b/changelog/fix-7272-incorrect-payment-method-title deleted file mode 100644 index ad9fa07effe..00000000000 --- a/changelog/fix-7272-incorrect-payment-method-title +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -fix incorrect payment method title for non-WooPayments gateways diff --git a/readme.txt b/readme.txt index 56d46eb213e..2a6554048ac 100644 --- a/readme.txt +++ b/readme.txt @@ -94,7 +94,8 @@ Please note that our support for the checkout block is still experimental and th == Changelog == -= 6.5.1 - 2023-09-27 = += 6.5.1 - 2023-09-26 = +* Fix - fix incorrect payment method title for non-WooPayments gateways = 6.5.0 - 2023-09-21 =