public function PromotionUsageInterface::load in Commerce Core 8.2
Loads the usage for the given promotion.
The optional $mail parameter can be used to restrict the usage count to a specific customer email.
Parameters
\Drupal\commerce_promotion\Entity\PromotionInterface $promotion: The promotion.
string $mail: (Optional) The customer email.
Return value
int The usage.
1 method overrides PromotionUsageInterface::load()
- PromotionUsage::load in modules/
promotion/ src/ PromotionUsage.php - Loads the usage for the given promotion.
File
- modules/
promotion/ src/ PromotionUsageInterface.php, line 69
Class
- PromotionUsageInterface
- Tracks promotion usage.
Namespace
Drupal\commerce_promotionCode
public function load(PromotionInterface $promotion, $mail = NULL);