2023-10-17 15:11:48 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The save payment methods module.
|
|
|
|
*
|
|
|
|
* @package WooCommerce\PayPalCommerce\Applepay
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace WooCommerce\PayPalCommerce\SavePaymentMethods;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2023-10-18 17:03:15 +02:00
|
|
|
/**
|
|
|
|
* Class SavePaymentMethodsModule
|
|
|
|
*/
|
2023-10-17 15:11:48 +02:00
|
|
|
class SavePaymentMethodsModule implements ModuleInterface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
public function setup(): ServiceProviderInterface {
|
|
|
|
return new ServiceProvider(
|
|
|
|
require __DIR__ . '/../services.php',
|
|
|
|
require __DIR__ . '/../extensions.php'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-10-18 17:03:15 +02:00
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
2023-10-19 11:18:01 +02:00
|
|
|
public function run( ContainerInterface $c ): void {
|
|
|
|
if ( ! $c->get( 'save-payment-methods.eligible' ) ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2023-10-17 15:11:48 +02:00
|
|
|
}
|