WC_Abstract_Order::get_total_fees()publicWC 1.0

Calculate fees for all line items.

Method of the class: WC_Abstract_Order{}

No Hooks.

Return

float. Fee total.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->get_total_fees();

WC_Abstract_Order::get_total_fees() code WC 8.7.0

public function get_total_fees() {
	return array_reduce(
		$this->get_fees(),
		function( $carry, $item ) {
			return $carry + (float) $item->get_total();
		},
		0.0
	);
}