WordPress at a glance
function is not described

wc_format_weight() WC 3.0.0

Format a weight for display.

Hooks from the function
Return

String. Nothing.

Usage

wc_format_weight( $weight );
$weight(float) (required)
Weight.

Changelog

Since 3.0.0 Introduced.

Code of wc_format_weight() WC 5.2.2

<?php
function wc_format_weight( $weight ) {
	$weight_string = wc_format_localized_decimal( $weight );

	if ( ! empty( $weight_string ) ) {
		$weight_string .= ' ' . get_option( 'woocommerce_weight_unit' );
	} else {
		$weight_string = __( 'N/A', 'woocommerce' );
	}

	return apply_filters( 'woocommerce_format_weight', $weight_string, $weight );
}