wc_add_number_precision_deep( array $value, bool $round = true )
Add precision to an array of number and return an array of int.
Description Description
Parameters Parameters
- $value
-
(Required) Number to add precision to.
- $round
-
(Optional) Should we round after adding precision?.
Default value: true
Return Return
(int|array)
Source Source
File: includes/wc-core-functions.php
function wc_add_number_precision_deep( $value, $round = true ) { if ( ! is_array( $value ) ) { return wc_add_number_precision( $value, $round ); } foreach ( $value as $key => $sub_value ) { $value[ $key ] = wc_add_number_precision_deep( $sub_value, $round ); } return $value; }
Changelog Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |