From f54f413f7b216e88f8e60a20580a1ca8913b246a Mon Sep 17 00:00:00 2001 From: Alex P Date: Mon, 4 Sep 2023 16:09:33 +0300 Subject: [PATCH] Set payment method title for order edit page only if our gateway --- modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php index 0b01b4750..c703de904 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php @@ -290,9 +290,11 @@ class PayPalGateway extends \WC_Payment_Gateway { // in the constructor, so must do it here. global $theorder; if ( $theorder instanceof WC_Order ) { - $payment_method_title = $theorder->get_payment_method_title(); - if ( $payment_method_title ) { - $this->title = $payment_method_title; + if ( $theorder->get_payment_method() === self::ID ) { + $payment_method_title = $theorder->get_payment_method_title(); + if ( $payment_method_title ) { + $this->title = $payment_method_title; + } } } }