WC_Cart_Totals::get_values_for_total
Returns array of values for totals calculation.
Method of the class: WC_Cart_Totals{}
No Hooks.
Returns
Array. Items object
Usage
// protected - for code of main (parent) or child class $result = $this->get_values_for_total( $field );
- $field(string) (required)
- Field name. Will probably be
totalorsubtotal.
WC_Cart_Totals::get_values_for_total() WC Cart Totals::get values for total code WC 10.6.2
protected function get_values_for_total( $field ) {
return array_values( wp_list_pluck( $this->items, $field ) );
}