vendor/lnb/shopware6-fraud-prevention/src/Subscriber/CheckoutOrderPlacedCriteriaSubscriber.php line 19

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Lnb\Shopware6\FraudPrevention\Subscriber;
  4. use Shopware\Core\Checkout\Cart\Event\CheckoutOrderPlacedCriteriaEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class CheckoutOrderPlacedCriteriaSubscriber implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents(): array
  9.     {
  10.         return [
  11.             CheckoutOrderPlacedCriteriaEvent::class => 'onCheckoutOrderPlacedCriteria',
  12.         ];
  13.     }
  14.     public function onCheckoutOrderPlacedCriteria(CheckoutOrderPlacedCriteriaEvent $event): void
  15.     {
  16.         $event->getCriteria()->addAssociation('tags');
  17.     }
  18. }