<?php
declare(strict_types=1);
namespace Lnb\Shopware6\FraudPrevention\Subscriber;
use Shopware\Core\Checkout\Cart\Event\CheckoutOrderPlacedCriteriaEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class CheckoutOrderPlacedCriteriaSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
CheckoutOrderPlacedCriteriaEvent::class => 'onCheckoutOrderPlacedCriteria',
];
}
public function onCheckoutOrderPlacedCriteria(CheckoutOrderPlacedCriteriaEvent $event): void
{
$event->getCriteria()->addAssociation('tags');
}
}