wc_admin_number_format()WC 1.0

Format a number using the decimal and thousands separator settings in WooCommerce.

No Hooks.

Return

String.

Usage

wc_admin_number_format( $number );
$number(mixed) (required)
Number to be formatted.

wc_admin_number_format() code WC 9.0.1

function wc_admin_number_format( $number ) {
	$currency_settings = Settings::get_currency_settings();
	return number_format(
		$number,
		0,
		$currency_settings['decimalSeparator'],
		$currency_settings['thousandSeparator']
	);
}