WordPress at a glance
function is not described

wc_format_dimensions() WC 3.0.0

Format dimensions for display.

Hooks from the function
Return

String. Nothing.

Usage

wc_format_dimensions( $dimensions );
$dimensions(array) (required)
Array of dimensions.

Changelog

Since 3.0.0 Introduced.

Code of wc_format_dimensions() WC 5.3.0

<?php
function wc_format_dimensions( $dimensions ) {
	$dimension_string = implode( ' &times; ', array_filter( array_map( 'wc_format_localized_decimal', $dimensions ) ) );

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

	return apply_filters( 'woocommerce_format_dimensions', $dimension_string, $dimensions );
}