WC_Countries::restore_locale_resolution_snapshots │ private static │ WC 1.0

Restore the geographical caches that nested lookups changed while the locale was resolving, and end the resolution.

This is a separate method so PHPStan does not treat the registry as the empty array set before determine_locale().

Method of the class: WC_Countries{}

No Hooks.

Returns

void. Nothing (null).

Usage

$result = WC_Countries::restore_locale_resolution_snapshots();

WC_Countries::restore_locale_resolution_snapshots() code WC 11.3.0

private static function restore_locale_resolution_snapshots() {
	foreach ( self::$locale_resolution_snapshots ?? array() as $snapshot ) {
		$snapshot[0]->geo_cache = $snapshot[1];
	}

	self::$locale_resolution_snapshots = null;
}