woocommerce_cart_total_discount хук-фильтрWC 1.0

Gets the total discount amount.

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

add_filter( 'woocommerce_cart_total_discount', 'wp_kama_woocommerce_cart_total_discount_filter', 10, 2 );

/**
 * Function for `woocommerce_cart_total_discount` filter-hook.
 * 
 * @param  $wc_price() 
 * @param  $that       
 *
 * @return 
 */
function wp_kama_woocommerce_cart_total_discount_filter( $wc_price(), $that ){

	// filter...
	return $wc_price();
}
$wc_price()
-
$that
-

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

WC_Cart::get_total_discount()
woocommerce_cart_total_discount
woocommerce/includes/class-wc-cart.php 2103
return apply_filters( 'woocommerce_cart_total_discount', $this->get_discount_total() ? wc_price( $this->get_discount_total() ) : false, $this );

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

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