WC_Coupon::set_usage_limit
Set the amount of times this coupon can be used.
Method of the class: WC_Coupon{}
No Hooks.
Returns
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 10.8.1
public function set_usage_limit( $usage_limit ) {
$this->set_prop( 'usage_limit', absint( $usage_limit ) );
}