Automattic\WooCommerce\Blocks\Utils

BlocksSharedState::get_locale_dataprivate staticWC 1.0

Get locale data to include in settings.

Method of the class: BlocksSharedState{}

No Hooks.

Returns

Array.

Usage

$result = BlocksSharedState::get_locale_data(): array;

BlocksSharedState::get_locale_data() code WC 10.8.1

private static function get_locale_data(): array {
	global $wp_locale;

	return array(
		'locale' => array(
			'siteLocale'    => get_locale(),
			'userLocale'    => get_user_locale(),
			'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ),
		),
	);
}