diff --git a/src/Gateway/GatewayModule.php b/src/Gateway/GatewayModule.php index 889769de..1e9602df 100644 --- a/src/Gateway/GatewayModule.php +++ b/src/Gateway/GatewayModule.php @@ -118,6 +118,12 @@ public function services(): array return $method['id'] !== Constants::BANCOMATPAY; }); } + $almaFlag = apply_filters('inpsyde.feature-flags.mollie-woocommerce.alma_enabled', false); + if (!$almaFlag) { + return array_filter($availablePaymentMethods, static function ($method) { + return $method['id'] !== Constants::ALMA; + }); + } return $availablePaymentMethods; }, 'gateway.isSDDGatewayEnabled' => static function (ContainerInterface $container): bool { diff --git a/src/PaymentMethods/Constants.php b/src/PaymentMethods/Constants.php index 6f62e6b2..d8597c60 100644 --- a/src/PaymentMethods/Constants.php +++ b/src/PaymentMethods/Constants.php @@ -12,4 +12,6 @@ class Constants public const BANKTRANSFER = 'banktransfer'; public const BANCOMATPAY = 'bancomatpay'; + + public const ALMA = 'alma'; }