WooCommerce Code Reference

WC_Geolite_Integration
in package

Geolite integration class.

Tags
deprecated
3.9.0

Table of Contents

$database  : string
MaxMind GeoLite2 database path.
$log  : WC_Logger
Logger instance.
__construct()  : mixed
Constructor.
get_country_iso()  : string
Get country 2-letters ISO by IP address.
log()  : mixed
Logging method.

Properties

Methods

__construct()

Constructor.

public __construct(string $database) : mixed
Parameters
$database : string

MaxMind GeoLite2 database path.

Return values
mixed

get_country_iso()

Get country 2-letters ISO by IP address.

public get_country_iso(string $ip_address) : string

Returns empty string when not able to find any ISO code.

Parameters
$ip_address : string

User IP address.

Tags
deprecated
3.9.0
Return values
string

log()

Logging method.

private log(string $message[, string $level = 'info' ]) : mixed
Parameters
$message : string

Log message.

$level : string = 'info'

Log level. Available options: 'emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info' and 'debug'. Defaults to 'info'.

Return values
mixed