WC_Coupon::set_usage_limit()publicWC 3.0.0

Set the amount of times this coupon can be used.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->set_usage_limit( $usage_limit );
$usage_limit(int) (required)
Usage limit.

Changelog

Since 3.0.0 Introduced.

Code of WC_Coupon::set_usage_limit() WC 6.7.0

public function set_usage_limit( $usage_limit ) {
	$this->set_prop( 'usage_limit', absint( $usage_limit ) );
}