woocommerce_order_discount_to_display хук-фильтрWC 2.3.0

Get the discount amount (formatted).

Использование

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(строка)
Excl or incl tax display mode.
$that
-

Список изменений

С версии 2.3.0 Введена.

Где вызывается хук

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

Где используется хук в WooCommerce

Использование не найдено.