You are here

public function PromotionUsageInterface::loadMultipleByCoupon in Commerce Core 8.2

Loads the usage for the given coupon.

The optional $mail parameter can be used to restrict the usage count to a specific customer email.

Parameters

\Drupal\commerce_promotion\Entity\CouponInterface[] $coupons: The coupons.

string $mail: (Optional) The customer email.

Return value

array The usage counts, keyed by promotion ID.

1 method overrides PromotionUsageInterface::loadMultipleByCoupon()
PromotionUsage::loadMultipleByCoupon in modules/promotion/src/PromotionUsage.php
Loads the usage for the given coupon.

File

modules/promotion/src/PromotionUsageInterface.php, line 117

Class

PromotionUsageInterface
Tracks promotion usage.

Namespace

Drupal\commerce_promotion

Code

public function loadMultipleByCoupon(array $coupons, $mail = NULL);