Check if WC_Logger exists before try to use in WC_Geo_IP class

This commit is contained in:
Claudio Sanches 2015-11-09 22:08:22 -02:00
parent 98abbf0184
commit 770f6793fc
1 changed files with 4 additions and 0 deletions

View File

@ -1113,6 +1113,10 @@ class WC_Geo_IP {
* @param string $message
*/
public static function log( $message ) {
if ( ! class_exists( 'WC_Logger' ) ) {
include_once( 'class-wc-logger.php' );
}
if ( empty( self::$log ) ) {
self::$log = new WC_Logger();
}