WC_Admin_Addons::get_locale_data_from_transient()private staticWC 1.0

Retrieves the locale data from a transient.

Transient value is an array of locale data in the following format: array(

'en_US' => ...,
'fr_FR' => ...,

)

If the transient does not exist, does not have a value, or has expired, then the return value will be false.

Метод класса: WC_Admin_Addons{}

Хуков нет.

Возвращает

Разное. Value of transient.

Использование

$result = WC_Admin_Addons::get_locale_data_from_transient( $transient, $locale );
$transient(строка) (обязательный)
Transient name. Expected to not be SQL-escaped.
$locale(строка) (обязательный)
Locale to retrieve.

Код WC_Admin_Addons::get_locale_data_from_transient() WC 8.7.0

private static function get_locale_data_from_transient( $transient, $locale ) {
	$transient_value = get_transient( $transient );
	$transient_value = is_array( $transient_value ) ? $transient_value : array();
	return $transient_value[ $locale ] ?? false;
}