WC_Abstract_Order::get_total_fees()publicWC 1.0

Calculate fees for all line items.

Метод класса: WC_Abstract_Order{}

Хуков нет.

Возвращает

float. Fee total.

Использование

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

Код WC_Abstract_Order::get_total_fees() 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
	);
}