WordPress at Your Fingertips
function is not described

WC_Cart::get_displayed_subtotal() public WC 2.6.0

Determines the value that the customer spent and the subtotal displayed, used for things like coupon validation.

Since the coupon lines are displayed based on the TAX DISPLAY value of cart, this is used to determine the spend.

If cart totals are shown including tax, use the subtotal. If cart totals are shown excluding tax, use the subtotal ex tax (tax is shown after coupons).

{} It's a method of the class: WC_Cart{}

No Hooks.

Return

String.

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_displayed_subtotal();

Changelog

Since 2.6.0 Introduced.

Code of WC_Cart::get_displayed_subtotal() WC 5.7.1

public function get_displayed_subtotal() {
	return $this->display_prices_including_tax() ? $this->get_subtotal() + $this->get_subtotal_tax() : $this->get_subtotal();
}