This commit is contained in:
Pedro Silva 2024-01-17 12:04:48 +00:00
parent 15d398af8f
commit b31274efb0
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -190,11 +190,7 @@ class WcSubscriptionsModule implements ModuleInterface {
function ( $payment_method_to_display, $subscription, $context ) {
$payment_gateway = wc_get_payment_gateway_by_order( $subscription );
if (
$subscription instanceof \WC_Subscription
&& $payment_gateway
&& $payment_gateway->id === PayPalGateway::ID
) {
if ( $payment_gateway && $payment_gateway->id === PayPalGateway::ID ) {
return $subscription->get_payment_method_title( $context );
}