WordPress at Your Fingertips
function is not described

WC_Cart_Totals::get_values_for_total() protected WC 1.0

Returns array of values for totals calculation.

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

No Hooks.


Array. Items object


// protected - for code of main (parent) or child class
$result = $this->get_values_for_total( $field );
$field(string) (required)
Field name. Will probably be total or subtotal.

Code of WC_Cart_Totals::get_values_for_total() WC 5.9.0

protected function get_values_for_total( $field ) {
	return array_values( wp_list_pluck( $this->items, $field ) );