<?php
namespace Wbfk\DigitalInvoice\Subscriber;
use Shopware\Core\Checkout\Document\Event\DocumentOrderCriteriaEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class DocumentOrderCriteriaSubscriber implements EventSubscriberInterface
{
public function __construct()
{
}
public static function getSubscribedEvents(): array
{
return [
DocumentOrderCriteriaEvent::class => 'documentOrderCriteria',
];
}
public function documentOrderCriteria(DocumentOrderCriteriaEvent $event): void
{
$event->getCriteria()->addAssociations([
'billingAddress.country',
'wbfk_invoice_details_order_extension',
]);
}
}