mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
24 lines
623 B
PHP
24 lines
623 B
PHP
|
<?php declare(strict_types=1);
|
||
|
/**
|
||
|
* phpcs:disable Inpsyde.CodeQuality.ReturnTypeDeclaration
|
||
|
* phpcs:disable Inpsyde.CodeQuality.ArgumentTypeDeclaration
|
||
|
*/
|
||
|
|
||
|
namespace Inpsyde\Woocommerce\Logging;
|
||
|
|
||
|
use Inpsyde\Woocommerce\Logging\Logger\NullLogger;
|
||
|
use Inpsyde\Woocommerce\Logging\Logger\WooCommerceLogger;
|
||
|
use Psr\Container\ContainerInterface;
|
||
|
|
||
|
return [
|
||
|
'woocommerce.logger.woocommerce' => function (ContainerInterface $container) {
|
||
|
if (!class_exists(\WC_Logger::class)) {
|
||
|
return new NullLogger();
|
||
|
}
|
||
|
|
||
|
return new WooCommerceLogger(
|
||
|
wc_get_logger()
|
||
|
);
|
||
|
},
|
||
|
];
|