WC_Geolocation::maybe_update_database()
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.
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 since | 3.9.0 |
WC_Geolocation::maybe_update_database() WC Geolocation::maybe update database code WC 8.7.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; }