♻️ Use new base class for DCC status check

This commit is contained in:
Philipp Stracker 2025-01-30 17:43:15 +01:00
parent 4006605964
commit e6a6cbb7b1
No known key found for this signature in database
6 changed files with 51 additions and 126 deletions

View file

@ -299,7 +299,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
assert( $dcc_applies instanceof DCCApplies );
// Unset BCDC if merchant is eligible for ACDC.
if ( $dcc_product_status->dcc_is_active() && ! $container->get( 'wcgateway.settings.allow_card_button_gateway' ) ) {
if ( $dcc_product_status->is_active() && ! $container->get( 'wcgateway.settings.allow_card_button_gateway' ) ) {
unset( $payment_methods[ CardButtonGateway::ID ] );
}
@ -319,7 +319,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
}
// Unset Fastlane if store location is not United States or merchant is not eligible for ACDC.
if ( $container->get( 'api.shop.country' ) !== 'US' || ! $dcc_product_status->dcc_is_active() ) {
if ( $container->get( 'api.shop.country' ) !== 'US' || ! $dcc_product_status->is_active() ) {
unset( $payment_methods['ppcp-axo-gateway'] );
}