WC_Abstract_Order::get_subtotal()publicWC 1.0

Gets order subtotal. Order subtotal is the price of all items excluding taxes, fees, shipping cost, and coupon discounts. If sale price is set on an item, the subtotal will include this sale discount. E.g. a product with a regular price of $100 bought at a 50% discount will represent $50 of the subtotal for the order.

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

Хуки из метода

Возвращает

float.

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

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

Код WC_Abstract_Order::get_subtotal() WC 8.7.0

public function get_subtotal() {
	$subtotal = NumberUtil::round( $this->get_cart_subtotal_for_order(), wc_get_price_decimals() );
	return apply_filters( 'woocommerce_order_get_subtotal', (float) $subtotal, $this );
}