Add an option to hide card button gateway if not needed

This commit is contained in:
Alex P 2022-07-26 10:58:21 +03:00
parent ab69f40220
commit c2d0a3aa69
4 changed files with 145 additions and 101 deletions

View file

@ -284,7 +284,9 @@ class WCGatewayModule implements ModuleInterface {
$methods[] = $container->get( 'wcgateway.credit-card-gateway' );
}
$methods[] = $container->get( 'wcgateway.card-button-gateway' );
if ( $container->get( 'wcgateway.settings.allow_card_button_gateway' ) ) {
$methods[] = $container->get( 'wcgateway.card-button-gateway' );
}
if ( 'DE' === $container->get( 'api.shop.country' ) && 'EUR' === $container->get( 'api.shop.currency' ) ) {
$methods[] = $container->get( 'wcgateway.pay-upon-invoice-gateway' );