WC_Abstract_Order::get_discount_to_display( string $tax_display = '' )

Get the discount amount (formatted).


Description Description


Parameters Parameters

$tax_display

(Optional) Excl or incl tax display mode.

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	public function get_discount_to_display( $tax_display = '' ) {
		$tax_display = $tax_display ? $tax_display : get_option( 'woocommerce_tax_display_cart' );
		return apply_filters( 'woocommerce_order_discount_to_display', wc_price( $this->get_total_discount( 'excl' === $tax_display && 'excl' === get_option( 'woocommerce_tax_display_cart' ) ), array( 'currency' => $this->get_currency() ) ), $this );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.