Merge pull request #12807 from woocommerce/add-warning-to-logger
Add message when get_log_file_path called too early
This commit is contained in:
commit
6583bb84aa
|
@ -345,8 +345,10 @@ class WC_Log_Handler_File extends WC_Log_Handler {
|
|||
public static function get_log_file_path( $handle ) {
|
||||
if ( function_exists( 'wp_hash' ) ) {
|
||||
return trailingslashit( WC_LOG_DIR ) . $handle . '-' . sanitize_file_name( wp_hash( $handle ) ) . '.log';
|
||||
} else {
|
||||
wc_doing_it_wrong( __METHOD__, __( 'This method should not be called before plugins_loaded.', 'woocommerce' ), '2.7' );
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue