public function PromotionUsage::deleteByCoupon in Commerce Core 8.2
Deletes all usage for the given coupons.
Parameters
\Drupal\commerce_promotion\Entity\CouponInterface[] $coupons: The coupons.
Overrides PromotionUsageInterface::deleteByCoupon
File
- modules/
promotion/ src/ PromotionUsage.php, line 66
Class
Namespace
Drupal\commerce_promotionCode
public function deleteByCoupon(array $coupons) {
$this->connection
->delete('commerce_promotion_usage')
->condition('coupon_id', EntityHelper::extractIds($coupons), 'IN')
->execute();
}