Skip to content

Commit

Permalink
Merge pull request #679 from woocommerce/tweak/use-logger-notice-inst…
Browse files Browse the repository at this point in the history
…ead-of-add

Use `debug` method and not `add`, which will be deprecated in future .
  • Loading branch information
roykho authored Jun 6, 2018
2 parents 158d162 + 8dd827a commit 1af1189
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/class-wc-stripe-logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ public static function log( $message, $start_time = null, $end_time = null ) {

}

self::$logger->add( self::WC_LOG_FILENAME, $log_entry );
if ( version_compare( WC_VERSION, '3.0.0', '>=' ) ) {
self::$logger->debug( $log_entry, array( 'source' => self::WC_LOG_FILENAME ) );
} else {
self::$logger->add( self::WC_LOG_FILENAME, $log_entry );
}
}
}
}

0 comments on commit 1af1189

Please sign in to comment.