Skip to content

Commit

Permalink
Put alma method under flag default hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Jun 3, 2024
1 parent cbf8d82 commit 7e2bcb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Gateway/GatewayModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/PaymentMethods/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ class Constants
public const BANKTRANSFER = 'banktransfer';

public const BANCOMATPAY = 'bancomatpay';

public const ALMA = 'alma';
}

0 comments on commit 7e2bcb0

Please sign in to comment.