From e14fc1014157b56e21d193f084543b9933b48b19 Mon Sep 17 00:00:00 2001 From: dinamiko Date: Tue, 2 Aug 2022 12:24:22 +0200 Subject: [PATCH] Fix wrong disabling oxxo --- modules/ppcp-wc-gateway/src/WCGatewayModule.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/ppcp-wc-gateway/src/WCGatewayModule.php b/modules/ppcp-wc-gateway/src/WCGatewayModule.php index 356a07ca8..d01287f67 100644 --- a/modules/ppcp-wc-gateway/src/WCGatewayModule.php +++ b/modules/ppcp-wc-gateway/src/WCGatewayModule.php @@ -232,15 +232,13 @@ class WCGatewayModule implements ModuleInterface { add_action( 'init', function () use ( $c ) { - if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === false ) { - return; - } - if ( 'DE' === $c->get( 'api.shop.country' ) && 'EUR' === $c->get( 'api.shop.currency' ) ) { ( $c->get( 'wcgateway.pay-upon-invoice' ) )->init(); } - ( $c->get( 'wcgateway.oxxo' ) )->init(); + if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === true ) { + ( $c->get( 'wcgateway.oxxo' ) )->init(); + } } );