Check if WC_Logger exists before try to use in WC_Geo_IP class
This commit is contained in:
parent
98abbf0184
commit
770f6793fc
|
@ -1113,6 +1113,10 @@ class WC_Geo_IP {
|
||||||
* @param string $message
|
* @param string $message
|
||||||
*/
|
*/
|
||||||
public static function log( $message ) {
|
public static function log( $message ) {
|
||||||
|
if ( ! class_exists( 'WC_Logger' ) ) {
|
||||||
|
include_once( 'class-wc-logger.php' );
|
||||||
|
}
|
||||||
|
|
||||||
if ( empty( self::$log ) ) {
|
if ( empty( self::$log ) ) {
|
||||||
self::$log = new WC_Logger();
|
self::$log = new WC_Logger();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue