diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index 694eb2d40b4..3f5a5f84fa6 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -194,7 +194,7 @@ class WC_Geolocation { $country_code = strtoupper( sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_COUNTRY_CODE'] ) ) ); // WPCS: input var ok, CSRF ok. } else { $ip_address = $ip_address ? $ip_address : self::get_ip_address(); - $database = self::get_local_database_path(); + $database = WC_Integration_MaxMind_Geolocation_Database::get_database_path(); if ( file_exists( $database ) ) { $country_code = self::geolocate_via_db( $ip_address, $database ); @@ -220,11 +220,12 @@ class WC_Geolocation { /** * Path to our local db. * + * @deprecated 3.9.0 * @param string $deprecated Deprecated since 3.4.0. * @return string */ public static function get_local_database_path( $deprecated = '2' ) { - require_once WC_ABSPATH . 'includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation-database.php'; + wc_deprecated_function( 'WC_Geolocation::get_local_database_path', '3.9.0' ); return WC_Integration_MaxMind_Geolocation_Database::get_database_path(); }