LLMS_Coupon::get_remaining_uses()
Get the number of remaining uses calculated by subtracting # of uses from the usage limit
Return Return
(string|int)
Source Source
File: includes/models/model.llms.coupon.php
public function get_remaining_uses() { $limit = $this->get( 'usage_limit' ); // If usage is unlimited. if ( ! $limit ) { return _x( 'Unlimited', 'Remaining coupon uses', 'lifterlms' ); } else { return $limit - $this->get_uses(); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |