You are here

public function Promotion::getCustomerUsageLimit in Commerce Core 8.2

Gets the per customer promotion usage limit.

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

Return value

int The per customer promotion usage limit.

Overrides PromotionInterface::getCustomerUsageLimit

1 call to Promotion::getCustomerUsageLimit()
Promotion::available in modules/promotion/src/Entity/Promotion.php
Checks whether the promotion is available for the given order.

File

modules/promotion/src/Entity/Promotion.php, line 408

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

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