Skip to content

Commit

Permalink
Merge release/6.5.1 into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoumpierre committed Sep 26, 2023
2 parents efd9c5a + 3b47e90 commit cdd14ca
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 8 additions & 0 deletions includes/payment-methods/class-upe-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit cdd14ca

Please sign in to comment.