WC_Geolocation::maybe_update_database │ public static │ WC 1.0

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

Maybe trigger a DB update for the first time.

Method of the class: WC_Geolocation{}

No Hooks.

Returns

string.

Usage

$result = WC_Geolocation::maybe_update_database( $new_value, $old_value );
$new_value(string) (required)
New value.
$old_value(string) (required)
Old value.

Changelog

Deprecated since 3.9.0

WC_Geolocation::maybe_update_database() code WC 11.1.2

public static function maybe_update_database( $new_value, $old_value ) {
	wc_deprecated_function( 'WC_Geolocation::maybe_update_database', '3.9.0' );
	if ( $new_value !== $old_value && self::is_geolocation_enabled( $new_value ) ) {
		self::update_database();
	}

	return $new_value;
}