Drupal is a registered trademark of Dries Buytaert
drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.14 Minor update available for module linkit (7.0.14). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). symfony_mailer 2.0.0 Major update available for module symfony_mailer (2.0.0). editoria11y 3.0.1 Minor update available for module editoria11y (3.0.1). geofield_map 11.1.9 Minor update available for module geofield_map (11.1.9). domain 3.0.0 Major update available for module domain (3.0.0). ai 1.2.15 Minor update available for module ai (1.2.15). ai 1.3.4 Minor update available for module ai (1.3.4).

Provides a service to give you the entities that are affected by a promotion.

If your offer type supports it, you can do stuff like this:

/** @var \Drupal\affected_by_promotion\AffectedEntitiesManager $mng */
$mng = \Drupal::service('affected_by_promotion.affected_entities_manager');
/** @var \Drupal\Core\Database\Query\SelectInterface $q */
$q = $mng->getAffectedEntitiesQuery($promotion, 'commerce_product');
$products = $q->execute();

For your offer type plugin to support it, it has to implement the following interface:

\Drupal\affected_by_promotion\SupportsAffectedEntitiesQueryInterface

Which has the following method:

public function getAffectedEntitiesQuery($entity_type_id);

There is also an issue to get this into commerce: https://www.drupal.org/project/commerce/issues/3007070

Activity

Total releases
1
First release
Mar 2026
Latest release
1 month ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
8.x-1.5 Stable Mar 19, 2026