WC_Cart::get_displayed_subtotal PHP Méthode

get_displayed_subtotal() public méthode

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).
Since: 2.6.0
public get_displayed_subtotal ( ) : string
Résultat string
    public function get_displayed_subtotal()
    {
        if ('incl' === $this->tax_display_cart) {
            return wc_format_decimal($this->subtotal);
        } elseif ('excl' === $this->tax_display_cart) {
            return wc_format_decimal($this->subtotal_ex_tax);
        }
    }
WC_Cart