public function PromotionUsageInterface::register in Commerce Core 8.2
Registers usage for the given order.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
\Drupal\commerce_promotion\Entity\PromotionInterface $promotion: The promotion.
\Drupal\commerce_promotion\Entity\CouponInterface $coupon: (Optional) The used coupon.
1 method overrides PromotionUsageInterface::register()
- PromotionUsage::register in modules/
promotion/ src/ PromotionUsage.php - Registers usage for the given order.
File
- modules/
promotion/ src/ PromotionUsageInterface.php, line 27
Class
- PromotionUsageInterface
- Tracks promotion usage.
Namespace
Drupal\commerce_promotionCode
public function register(OrderInterface $order, PromotionInterface $promotion, CouponInterface $coupon = NULL);