diff --git a/changelog.txt b/changelog.txt index e440ee01f4f..760c80618f3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ *** WooPayments Changelog *** += 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. * Add - Add an option on the Settings screen to enable merchants to migrate their Stripe Billing subscriptions to on-site billing. 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 ); 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..2a6554048ac 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,10 @@ Please note that our support for the checkout block is still experimental and th == Changelog == += 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. * 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 */