woocommerce_order_discount_to_display filter-hookWC 2.3.0

Get the discount amount (formatted).

Usage

add_filter( 'woocommerce_order_discount_to_display', 'wp_kama_woocommerce_order_discount_to_display_filter', 10, 2 );

/**
 * Function for `woocommerce_order_discount_to_display` filter-hook.
 * 
 * @param string $tax_display Excl or incl tax display mode.
 * @param        $that        
 *
 * @return string
 */
function wp_kama_woocommerce_order_discount_to_display_filter( $tax_display, $that ){

	// filter...
	return $tax_display;
}
$tax_display(string)
Excl or incl tax display mode.
$that
-

Changelog

Since 2.3.0 Introduced.

Where the hook is called

WC_Abstract_Order::get_discount_to_display()
woocommerce_order_discount_to_display
woocommerce/includes/abstracts/abstract-wc-order.php 2075
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 );

Where the hook is used in WooCommerce

Usage not found.