WC_Abstract_Order::get_cart_total_for_order()protectedWC 1.0

Helper function. If you add all items in this order in cart again, this would be the cart total (assuming all other settings are same).

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

Хуков нет.

Возвращает

float. Cart total.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_cart_total_for_order();

Код WC_Abstract_Order::get_cart_total_for_order() WC 8.7.0

protected function get_cart_total_for_order() {
	return wc_remove_number_precision(
		$this->get_rounded_items_total(
			$this->get_values_for_total( 'total' )
		)
	);
}