Skip to content
Snippets Groups Projects
Commit a98f738c authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Merge branch 'bugfix/wc-logger' into 'master'

bugfix(wc logger): initialisation

See merge request !28
parents 7b7c5c22 27125ff6
No related branches found
Tags 1.12.1
1 merge request!28bugfix(wc logger): initialisation
Pipeline #344538 passed with warnings with stages
in 48 seconds
## [1.12.0] - 2023-07-10 ## [1.12.1] - 2024-03-26
### Fixed
- WC logger initialisation
## [1.12.0] - 2024-03-19
### Added ### Added
- sensitive data replacer - sensitive data replacer
......
...@@ -33,7 +33,7 @@ final class SimpleLoggerFactory implements LoggerFactory { ...@@ -33,7 +33,7 @@ final class SimpleLoggerFactory implements LoggerFactory {
$this->logger = new Logger( $this->channel ); $this->logger = new Logger( $this->channel );
if ( $this->options->use_wc_log ) { if ( $this->options->use_wc_log ) {
if ( \function_exists( 'wc_get_logger' ) ) { if ( \function_exists( 'wc_get_logger' ) && \did_action( 'woocommerce_init' ) ) {
$this->create_wc_handler(); $this->create_wc_handler();
} else { } else {
\add_action( 'woocommerce_init', [ $this, 'create_wc_handler' ] ); \add_action( 'woocommerce_init', [ $this, 'create_wc_handler' ] );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment