diff --git a/modules.local/ppcp-wc-gateway/extensions.php b/modules.local/ppcp-wc-gateway/extensions.php index 80c8c31c7..cf4b7cc97 100644 --- a/modules.local/ppcp-wc-gateway/extensions.php +++ b/modules.local/ppcp-wc-gateway/extensions.php @@ -64,7 +64,7 @@ return [ }, 'woocommerce.logger.woocommerce' => function (ContainerInterface $container): LoggerInterface { $settings = $container->get('wcgateway.settings'); - if (! $settings->has('logging_enabled') || ! $settings->get('logging_enabled')) { + if (! function_exists('wc_get_logger') || ! $settings->has('logging_enabled') || ! $settings->get('logging_enabled')) { return new NullLogger(); }