WC_Abstract_Order::get_values_for_total( string $field )

Return array of values for calculations.


Description Description


Parameters Parameters

$field

(Required) Field name to return.


Top ↑

Return Return

(array) Array of values.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.