WordPress at Your Fingertips
function is not described

WC_Geolocation::maybe_update_database() public WC 1.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.

Maybe trigger a DB update for the first time.

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

No Hooks.

Return

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 3.9.0

Code of WC_Geolocation::maybe_update_database() WC 5.9.0

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;
}