WordPress at Your Fingertips
function is not described

WC_Abstract_Order::get_discount_to_display() public WC 2.3.0

Get the discount amount (formatted).

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

Return

String.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->get_discount_to_display( $tax_display );
$tax_display(string)
Excl or incl tax display mode.
Default: ''

Changelog

Since 2.3.0 Introduced.

Code of WC_Abstract_Order::get_discount_to_display() WC 5.8.0

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 );
}