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

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

add_filter( 'woocommerce_coupon_get_discount_amount', 'wp_kama_woocommerce_coupon_get_discount_amount_filter', 10, 5 );

/**
 * Function for `woocommerce_coupon_get_discount_amount` filter-hook.
 * 
 * @param  $NumberUtil::round  
 * @param  $discounting_amount 
 * @param  $cart_item          
 * @param  $single             
 * @param  $that               
 *
 * @return 
 */
function wp_kama_woocommerce_coupon_get_discount_amount_filter( $NumberUtil::round, $discounting_amount, $cart_item, $single, $that ){

	// filter...
	return $NumberUtil::round;
}
$NumberUtil::round
-
$discounting_amount
-
$cart_item
-
$single
-
$that
-

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

WC_Coupon::get_discount_amount()
woocommerce_coupon_get_discount_amount
WC_Discounts::apply_coupon_percent()
woocommerce_coupon_get_discount_amount
WC_Discounts::apply_coupon_fixed_product()
woocommerce_coupon_get_discount_amount
woocommerce/includes/class-wc-coupon.php 487-494
return apply_filters(
	'woocommerce_coupon_get_discount_amount',
	NumberUtil::round( min( $discount, $discounting_amount ), wc_get_rounding_precision() ),
	$discounting_amount,
	$cart_item,
	$single,
	$this
);
woocommerce/includes/class-wc-discounts.php 390
$filtered_discount = wc_add_number_precision( apply_filters( 'woocommerce_coupon_get_discount_amount', wc_remove_number_precision( $discount ), wc_remove_number_precision( $price_to_discount ), $item->object, false, $coupon ) );
woocommerce/includes/class-wc-discounts.php 455
$discount = wc_add_number_precision( apply_filters( 'woocommerce_coupon_get_discount_amount', wc_remove_number_precision( $discount ), wc_remove_number_precision( $price_to_discount ), $item->object, false, $coupon ) );

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

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