public function PromotionInterface::applies in Commerce Core 8.2
Checks whether the promotion can be applied to the given order.
Ensures that the promotion is compatible with other promotions on the order, and that the conditions pass.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
Return value
bool TRUE if promotion can be applied, FALSE otherwise.
1 method overrides PromotionInterface::applies()
- Promotion::applies in modules/
promotion/ src/ Entity/ Promotion.php - Checks whether the promotion can be applied to the given order.
File
- modules/
promotion/ src/ Entity/ PromotionInterface.php, line 416
Class
- PromotionInterface
- Defines the interface for promotions.
Namespace
Drupal\commerce_promotion\EntityCode
public function applies(OrderInterface $order);