mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Merge pull request #1661 from woocommerce/PCP-1965-method-title-order-editing
Set payment method title for order edit page only if our gateway
This commit is contained in:
commit
8b21e50b25
1 changed files with 5 additions and 3 deletions
|
@ -290,12 +290,14 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
// in the constructor, so must do it here.
|
||||
global $theorder;
|
||||
if ( $theorder instanceof WC_Order ) {
|
||||
if ( $theorder->get_payment_method() === self::ID ) {
|
||||
$payment_method_title = $theorder->get_payment_method_title();
|
||||
if ( $payment_method_title ) {
|
||||
$this->title = $payment_method_title;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return parent::get_title();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue