Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::get_locale_data()protectedWC 1.0

Get locale data to include in settings.

Method of the class: AssetDataRegistry{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_locale_data();

AssetDataRegistry::get_locale_data() code WC 8.6.1

protected function get_locale_data() {
	global $wp_locale;

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