WordPress at Your Fingertips
function is not described

WC_Geolocation::disable_geolocation_on_legacy_php() public WC 3.4.0

Deprecated from version 3.9.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Prevent geolocation via MaxMind when using legacy versions of php.

{} It's a method of the class: WC_Geolocation{}

No Hooks.




$result = WC_Geolocation::disable_geolocation_on_legacy_php( $default_customer_address );
$default_customer_address(string) (required)
current value.


Since 3.4.0 Introduced.
Deprecated 3.9.0

Code of WC_Geolocation::disable_geolocation_on_legacy_php() WC 5.9.0

public static function disable_geolocation_on_legacy_php( $default_customer_address ) {
	wc_deprecated_function( 'WC_Geolocation::disable_geolocation_on_legacy_php', '3.9.0' );

	if ( self::is_geolocation_enabled( $default_customer_address ) ) {
		$default_customer_address = 'base';

	return $default_customer_address;