Skip to content

Commit

Permalink
Add swish after flag default false
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Sep 24, 2024
1 parent 507ec1f commit 63ff8bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions public/images/swish.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/Gateway/GatewayModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ public function services(): array
return $method['id'] !== Constants::ALMA;
});
}
$swishFlag = apply_filters('inpsyde.feature-flags.mollie-woocommerce.swish_enabled', false);
if (!$swishFlag) {
$availablePaymentMethods = array_filter($availablePaymentMethods, static function ($method) {
return $method['id'] !== Constants::SWISH;
});
}
return $availablePaymentMethods;
},
'gateway.isSDDGatewayEnabled' => static function (ContainerInterface $container): bool {
Expand Down
3 changes: 1 addition & 2 deletions src/PaymentMethods/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class Constants
public const KLARNA = 'klarna';
public const DIRECTDEBIT = 'directdebit';
public const BANKTRANSFER = 'banktransfer';

public const BANCOMATPAY = 'bancomatpay';

public const ALMA = 'alma';
public const SWISH = 'swish';
}

0 comments on commit 63ff8bc

Please sign in to comment.