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

See how many and what price to apply to.

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

add_filter( 'woocommerce_coupon_get_apply_quantity', 'wp_kama_woocommerce_coupon_get_apply_quantity_filter', 10, 4 );

/**
 * Function for `woocommerce_coupon_get_apply_quantity` filter-hook.
 * 
 * @param  $apply_quantity 
 * @param  $item           
 * @param  $coupon         
 * @param  $that           
 *
 * @return 
 */
function wp_kama_woocommerce_coupon_get_apply_quantity_filter( $apply_quantity, $item, $coupon, $that ){

	// filter...
	return $apply_quantity;
}
$apply_quantity
-
$item
-
$coupon
-
$that
-

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

WC_Discounts::apply_coupon_percent()
woocommerce_coupon_get_apply_quantity
WC_Discounts::apply_coupon_fixed_product()
woocommerce_coupon_get_apply_quantity
WC_Discounts::apply_coupon_custom()
woocommerce_coupon_get_apply_quantity
woocommerce/includes/class-wc-discounts.php 368
$apply_quantity    = max( 0, apply_filters( 'woocommerce_coupon_get_apply_quantity', $apply_quantity, $item, $coupon, $this ) );
woocommerce/includes/class-wc-discounts.php 432
$apply_quantity = max( 0, apply_filters( 'woocommerce_coupon_get_apply_quantity', $apply_quantity, $item, $coupon, $this ) );
woocommerce/includes/class-wc-discounts.php 435
$apply_quantity = apply_filters( 'woocommerce_coupon_get_apply_quantity', $item->quantity, $item, $coupon, $this );
woocommerce/includes/class-wc-discounts.php 521
$apply_quantity = max( 0, apply_filters( 'woocommerce_coupon_get_apply_quantity', $apply_quantity, $item, $coupon, $this ) );

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

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