mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix lint
This commit is contained in:
parent
be87cf6cbd
commit
d20912a336
1 changed files with 16 additions and 11 deletions
|
@ -175,19 +175,24 @@ class WcSubscriptionsModule implements ModuleInterface {
|
|||
}
|
||||
);
|
||||
|
||||
add_filter( 'woocommerce_subscription_payment_method_to_display', function ( $payment_method_to_display, $subscription, $context ) {
|
||||
$payment_gateway = wc_get_payment_gateway_by_order( $subscription );
|
||||
add_filter(
|
||||
'woocommerce_subscription_payment_method_to_display',
|
||||
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
|
||||
) {
|
||||
return $subscription->get_payment_method_title( $context ); //data['payment_method_title'] ?? '';
|
||||
}
|
||||
if (
|
||||
$subscription instanceof \WC_Subscription
|
||||
&& $payment_gateway
|
||||
&& $payment_gateway->id === PayPalGateway::ID
|
||||
) {
|
||||
return $subscription->get_payment_method_title( $context );
|
||||
}
|
||||
|
||||
return $payment_method_to_display;
|
||||
}, 10, 3 );
|
||||
return $payment_method_to_display;
|
||||
},
|
||||
10,
|
||||
3
|
||||
);
|
||||
|
||||
add_action(
|
||||
'wc_ajax_' . SubscriptionChangePaymentMethod::ENDPOINT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue