woocommerce_order_recalculate_coupons_coupon_object filter-hookWC 3.2.0

Allow developers to filter this coupon before it gets re-applied to the order.

Usage

add_filter( 'woocommerce_order_recalculate_coupons_coupon_object', 'wp_kama_woocommerce_order_recalculate_coupons_coupon_object_filter', 10, 4 );

/**
 * Function for `woocommerce_order_recalculate_coupons_coupon_object` filter-hook.
 * 
 * @param  $coupon_object 
 * @param  $coupon_code   
 * @param  $coupon_item   
 * @param  $that          
 *
 * @return 
 */
function wp_kama_woocommerce_order_recalculate_coupons_coupon_object_filter( $coupon_object, $coupon_code, $coupon_item, $that ){

	// filter...
	return $coupon_object;
}
$coupon_object
-
$coupon_code
-
$coupon_item
-
$that
-

Changelog

Since 3.2.0 Introduced.

Where the hook is called

WC_Abstract_Order::recalculate_coupons()
woocommerce_order_recalculate_coupons_coupon_object
woocommerce/includes/abstracts/abstract-wc-order.php 1270
$coupon_object = apply_filters( 'woocommerce_order_recalculate_coupons_coupon_object', $coupon_object, $coupon_code, $coupon_item, $this );

Where the hook is used in WooCommerce

Usage not found.