wc_remove_number_precision_deep()WC 3.2.0

Remove precision from an array of number and return an array of int.

No Hooks.

Return

Int|Array.

Usage

wc_remove_number_precision_deep( $value );
$value(array) (required)
Number to add precision to.

Changelog

Since 3.2.0 Introduced.

wc_remove_number_precision_deep() code WC 7.3.0

function wc_remove_number_precision_deep( $value ) {
	if ( ! is_array( $value ) ) {
		return wc_remove_number_precision( $value );
	}

	foreach ( $value as $key => $sub_value ) {
		$value[ $key ] = wc_remove_number_precision_deep( $sub_value );
	}

	return $value;
}