2024-08-08 12:43:29 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The local alternative payment methods module.
|
|
|
|
*
|
|
|
|
* @package WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace WooCommerce\PayPalCommerce\LocalAlternativePaymentMethods;
|
|
|
|
|
|
|
|
use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider;
|
|
|
|
use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface;
|
|
|
|
use WooCommerce\PayPalCommerce\Vendor\Interop\Container\ServiceProviderInterface;
|
|
|
|
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class LocalAlternativePaymentMethodsModule
|
|
|
|
*/
|
|
|
|
class LocalAlternativePaymentMethodsModule implements ModuleInterface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function setup(): ServiceProviderInterface {
|
|
|
|
return new ServiceProvider(
|
|
|
|
require __DIR__ . '/../services.php',
|
|
|
|
require __DIR__ . '/../extensions.php'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function run(ContainerInterface $c): void {
|
2024-08-08 14:24:47 +02:00
|
|
|
add_filter('woocommerce_payment_gateways', function ($methods) use ($c) {
|
|
|
|
$methods[] = $c->get('ppcp-local-apms.bancontact.wc-gateway');
|
2024-08-08 12:43:29 +02:00
|
|
|
|
2024-08-08 14:24:47 +02:00
|
|
|
return $methods;
|
|
|
|
});
|
2024-08-08 12:43:29 +02:00
|
|
|
}
|
|
|
|
}
|