WC_Coupon::set_limit_usage_to_x_items()
Set usage limit to x number of items.
{} It's a method of the class: WC_Coupon{}
No Hooks.
Return
null
. Nothing.
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. |
Code of WC_Coupon::set_limit_usage_to_x_items() WC Coupon::set limit usage to x items WC 6.7.0
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 ) ); }