WC_Coupon::set_usage_limit()
Set the amount of times this coupon can be used.
Method of the class: WC_Coupon{}
No Hooks.
Return
null
. Nothing (null).
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. |
WC_Coupon::set_usage_limit() WC Coupon::set usage limit code WC 9.3.3
public function set_usage_limit( $usage_limit ) { $this->set_prop( 'usage_limit', absint( $usage_limit ) ); }