WC_Abstract_Order::get_total_fees
Calculate fees for all line items.
Method of the class: WC_Abstract_Order{}
No Hooks.
Returns
float. Fee total.
Usage
$WC_Abstract_Order = new WC_Abstract_Order(); $WC_Abstract_Order->get_total_fees();
WC_Abstract_Order::get_total_fees() WC Abstract Order::get total fees code WC 10.6.2
public function get_total_fees() {
return array_reduce(
$this->get_fees(),
function ( $carry, $item ) {
return $carry + (float) $item->get_total();
},
0.0
);
}