Fixed the validation for MaxMind license keys
This commit is contained in:
parent
f23c26a9f9
commit
000a75c23b
|
@ -99,7 +99,7 @@ class WC_MaxMind_Geolocation_Database {
|
|||
$tmp_database_path = trailingslashit( dirname( $tmp_archive_path ) ) . trailingslashit( $file->current()->getFilename() ) . self::DATABASE . self::DATABASE_EXTENSION;
|
||||
|
||||
$file->extractTo(
|
||||
dirname( $tmp_database_path ),
|
||||
dirname( $tmp_archive_path ),
|
||||
trailingslashit( $file->current()->getFilename() ) . self::DATABASE . self::DATABASE_EXTENSION,
|
||||
true
|
||||
);
|
||||
|
|
|
@ -62,9 +62,7 @@ class WC_MaxMind_Geolocation_Integration extends WC_Integration {
|
|||
}
|
||||
|
||||
// Check the license key by attempting to download the Geolocation database.
|
||||
$database = new WC_MaxMind_Geolocation_Database( $value );
|
||||
|
||||
$file = $database->download_database();
|
||||
$file = WC_MaxMind_Geolocation_Database::download_database( $value );
|
||||
if ( is_wp_error( $file ) ) {
|
||||
WC_Admin_Settings::add_error( $file->get_error_message() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue