mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add eps payment
This commit is contained in:
parent
11693c8df2
commit
f36d6d08df
7 changed files with 374 additions and 1 deletions
|
@ -49,6 +49,7 @@ class LocalAlternativePaymentMethodsModule implements ModuleInterface {
|
|||
|
||||
$methods[] = $c->get( 'ppcp-local-apms.bancontact.wc-gateway' );
|
||||
$methods[] = $c->get( 'ppcp-local-apms.blik.wc-gateway' );
|
||||
$methods[] = $c->get( 'ppcp-local-apms.eps.wc-gateway' );
|
||||
|
||||
return $methods;
|
||||
}
|
||||
|
@ -76,6 +77,9 @@ class LocalAlternativePaymentMethodsModule implements ModuleInterface {
|
|||
if ( $customer_country !== 'PL' || $site_currency !== 'PLN' ) {
|
||||
unset( $methods[ BlikGateway::ID ] );
|
||||
}
|
||||
if ( $customer_country !== 'AT' || $site_currency !== 'EUR' ) {
|
||||
unset( $methods[ EPSGateway::ID ] );
|
||||
}
|
||||
}
|
||||
|
||||
return $methods;
|
||||
|
@ -87,6 +91,7 @@ class LocalAlternativePaymentMethodsModule implements ModuleInterface {
|
|||
function( PaymentMethodRegistry $payment_method_registry ) use ( $c ): void {
|
||||
$payment_method_registry->register( $c->get( 'ppcp-local-apms.bancontact.payment-method' ) );
|
||||
$payment_method_registry->register( $c->get( 'ppcp-local-apms.blik.payment-method' ) );
|
||||
$payment_method_registry->register( $c->get( 'ppcp-local-apms.eps.payment-method' ) );
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -94,7 +99,7 @@ class LocalAlternativePaymentMethodsModule implements ModuleInterface {
|
|||
'woocommerce_paypal_payments_localized_script_data',
|
||||
function ( array $data ) {
|
||||
$default_disable_funding = $data['url_params']['disable-funding'] ?? '';
|
||||
$disable_funding = array_merge( array( 'bancontact', 'blik' ), array_filter( explode( ',', $default_disable_funding ) ) );
|
||||
$disable_funding = array_merge( array( 'bancontact', 'blik', 'eps' ), array_filter( explode( ',', $default_disable_funding ) ) );
|
||||
$data['url_params']['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
||||
|
||||
return $data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue