You are here

public function Coupon::getCustomerUsageLimit in Commerce Core 8.2

Gets the per customer coupon usage limit.

Represents the maximum number of times the coupon can be used by a customer. 0 for unlimited.

Return value

int The per customer coupon usage limit.

Overrides CouponInterface::getCustomerUsageLimit

1 call to Coupon::getCustomerUsageLimit()
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 137

Class

Coupon
Defines the Coupon entity.

Namespace

Drupal\commerce_promotion\Entity

Code

public function getCustomerUsageLimit() {
  return $this
    ->get('usage_limit_customer')->value;
}