Fix wrong disabling oxxo

This commit is contained in:
dinamiko 2022-08-02 12:24:22 +02:00
parent d5e2d8585c
commit e14fc10141

View file

@ -232,16 +232,14 @@ class WCGatewayModule implements ModuleInterface {
add_action( add_action(
'init', 'init',
function () use ( $c ) { 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' ) ) { if ( 'DE' === $c->get( 'api.shop.country' ) && 'EUR' === $c->get( 'api.shop.currency' ) ) {
( $c->get( 'wcgateway.pay-upon-invoice' ) )->init(); ( $c->get( 'wcgateway.pay-upon-invoice' ) )->init();
} }
if ( defined( 'PPCP_FLAG_OXXO' ) && PPCP_FLAG_OXXO === true ) {
( $c->get( 'wcgateway.oxxo' ) )->init(); ( $c->get( 'wcgateway.oxxo' ) )->init();
} }
}
); );
add_action( add_action(