WC_Cart_Totals::get_values_for_total()
Returns array of values for totals calculation.
Method of the class: WC_Cart_Totals{}
No Hooks.
Return
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 total or subtotal.
WC_Cart_Totals::get_values_for_total() WC Cart Totals::get values for total code WC 7.5.1
protected function get_values_for_total( $field ) { return array_values( wp_list_pluck( $this->items, $field ) ); }