WordPress at Your Fingertips
function is not described

WC_Abstract_Order::get_values_for_total() protected WC 1.0

Return array of values for calculations.

{} It's a method of the class: WC_Abstract_Order{}

No Hooks.

Return

Array. Array of values.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_values_for_total( $field );
$field(string) (required)
Field name to return.

Code of WC_Abstract_Order::get_values_for_total() WC 5.8.0

protected function get_values_for_total( $field ) {
	$items = array_map(
		function ( $item ) use ( $field ) {
			return wc_add_number_precision( $item[ $field ], false );
		},
		array_values( $this->get_items() )
	);
	return $items;
}