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: ''
Return Return
(string)
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 ); }
Changelog Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |