WC_Coupon::set_limit_usage_to_x_items()
Set usage limit to x number of items.
Method of the class: WC_Coupon{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Coupon = new WC_Coupon(); $WC_Coupon->set_limit_usage_to_x_items( $limit_usage_to_x_items );
- $limit_usage_to_x_items(int|null) (required)
- Limit usage to X items.
Changelog
Since 3.0.0 | Introduced. |
WC_Coupon::set_limit_usage_to_x_items() WC Coupon::set limit usage to x items code WC 9.4.2
public function set_limit_usage_to_x_items( $limit_usage_to_x_items ) { $this->set_prop( 'limit_usage_to_x_items', is_null( $limit_usage_to_x_items ) ? null : absint( $limit_usage_to_x_items ) ); }