WC_Abstract_Order::get_total_discount( bool $ex_tax = true )

Gets the total discount amount.


Description Description


Parameters Parameters

$ex_tax

(Optional) Show discount excl any tax.

Default value: true


Top ↑

Return Return

(float)


Top ↑

Source Source

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

	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', round( $total_discount, WC_ROUNDING_PRECISION ), $this );
	}


Top ↑

User Contributed Notes User Contributed Notes

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