WC_Countries::restore_locale_resolution_snapshots
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().
Метод класса: WC_Countries{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$result = WC_Countries::restore_locale_resolution_snapshots();
Код WC_Countries::restore_locale_resolution_snapshots() WC Countries::restore locale resolution snapshots 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;
}