WordPress at Your Fingertips
function is not described

WC_Coupon_Tracking::track_coupon_updated() public WC 1.0

Send a Tracks event when a coupon is updated.

{} It's a method of the class: WC_Coupon_Tracking{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Coupon_Tracking = new WC_Coupon_Tracking();
$WC_Coupon_Tracking->track_coupon_updated( $coupon, $updated_props );
$coupon(WC_Coupon) (required)
The coupon that has been updated.
$updated_props(Array) (required)
The props of the coupon that have been updated.

Code of WC_Coupon_Tracking::track_coupon_updated() WC 5.8.0

public function track_coupon_updated( $coupon, $updated_props ) {
	$properties = array(
		'discount_code'        => $coupon->get_code(),
		'free_shipping'        => $coupon->get_free_shipping(),
		'individual_use'       => $coupon->get_individual_use(),
		'exclude_sale_items'   => $coupon->get_exclude_sale_items(),
		'usage_limits_applied' => 0 < intval( $coupon->get_usage_limit() )
								|| 0 < intval( $coupon->get_usage_limit_per_user() )
								|| 0 < intval( $coupon->get_limit_usage_to_x_items() ),
	);

	WC_Tracks::record_event( 'coupon_updated', $properties );
}