WordPress at Your Fingertips
function is not described

WC_Abstract_Order::get_total_discount() public WC 1.0

Gets the total discount amount.

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

Hooks from the method

Return

float.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->get_total_discount( $ex_tax );
$ex_tax(true|false)
Show discount excl any tax.
Default: true

Code of WC_Abstract_Order::get_total_discount() WC 5.8.0

public function get_total_discount( $ex_tax = true ) {
	if ( $ex_tax ) {
		$total_discount = $this->get_discount_total();
	} else {
		$total_discount = $this->get_discount_total() + $this->get_discount_tax();
	}
	return apply_filters( 'woocommerce_order_get_total_discount', NumberUtil::round( $total_discount, WC_ROUNDING_PRECISION ), $this );
}