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:
Claudio Sanches 2017-01-12 20:52:56 -02:00 committed by GitHub
commit 6583bb84aa
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}
/**