woocommerce_update_coupon_usage_invalid_statuses filter-hookWC 9.0.0

Allow invalid order status filtering for updating coupon usage.

Usage

add_filter( 'woocommerce_update_coupon_usage_invalid_statuses', 'wp_kama_woocommerce_update_coupon_usage_invalid_statuses_filter' );

/**
 * Function for `woocommerce_update_coupon_usage_invalid_statuses` filter-hook.
 * 
 * @param array $invalid_statuses Array of statuses to consider invalid.
 *
 * @return array
 */
function wp_kama_woocommerce_update_coupon_usage_invalid_statuses_filter( $invalid_statuses ){

	// filter...
	return $invalid_statuses;
}
$invalid_statuses(array)
Array of statuses to consider invalid.

Changelog

Since 9.0.0 Introduced.

Where the hook is called

wc_update_coupon_usage_counts()
woocommerce_update_coupon_usage_invalid_statuses
woocommerce/includes/wc-order-functions.php 946-949
$invalid_statuses = apply_filters(
	'woocommerce_update_coupon_usage_invalid_statuses',
	$invalid_statuses
);

Where the hook is used in WooCommerce

Usage not found.