WC_Coupon::set_usage_count()publicWC 3.0.0

Set how many times this coupon has been used.

Method of the class: WC_Coupon{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->set_usage_count( $usage_count );
$usage_count(int) (required)
Usage count.

Changelog

Since 3.0.0 Introduced.

WC_Coupon::set_usage_count() code WC 9.4.2

public function set_usage_count( $usage_count ) {
	$this->set_prop( 'usage_count', absint( $usage_count ) );
}