mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Use gateway supports to check if refunds are allowed
This commit is contained in:
parent
19fea3c81e
commit
cfe61421f3
4 changed files with 15 additions and 53 deletions
|
@ -185,18 +185,6 @@ class LocalAlternativePaymentMethodsModule implements ServiceModule, ExtendingMo
|
|||
2
|
||||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_allowed_refund_payment_methods',
|
||||
function( array $payment_methods ) use ( $c ): array {
|
||||
$local_payment_methods = $c->get( 'ppcp-local-apms.payment-methods' );
|
||||
foreach ( $local_payment_methods as $payment_method ) {
|
||||
$payment_methods[] = $payment_method['id'];
|
||||
}
|
||||
|
||||
return $payment_methods;
|
||||
}
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue