public function Coupon::getUsageLimit in Commerce Core 8.2
Gets the coupon usage limit.
Represents the maximum number of times the coupon can be used. 0 for unlimited.
Return value
int The coupon usage limit.
Overrides CouponInterface::getUsageLimit
1 call to Coupon::getUsageLimit()
- Coupon::available in modules/
promotion/ src/ Entity/ Coupon.php - Checks whether the coupon is available for the given order.
File
- modules/
promotion/ src/ Entity/ Coupon.php, line 122
Class
- Coupon
- Defines the Coupon entity.
Namespace
Drupal\commerce_promotion\EntityCode
public function getUsageLimit() {
return $this
->get('usage_limit')->value;
}