custom/plugins/WbfkDigitalInvoice64/src/Subscriber/DocumentOrderCriteriaSubscriber.php line 22

Open in your IDE?
  1. <?php
  2. namespace Wbfk\DigitalInvoice\Subscriber;
  3. use Shopware\Core\Checkout\Document\Event\DocumentOrderCriteriaEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class DocumentOrderCriteriaSubscriber implements EventSubscriberInterface
  6. {
  7.     public function __construct()
  8.     {
  9.     }
  10.     public static function getSubscribedEvents(): array
  11.     {
  12.         return [
  13.             DocumentOrderCriteriaEvent::class => 'documentOrderCriteria',
  14.         ];
  15.     }
  16.     public function documentOrderCriteria(DocumentOrderCriteriaEvent $event): void
  17.     {
  18.         $event->getCriteria()->addAssociations([
  19.             'billingAddress.country',
  20.             'wbfk_invoice_details_order_extension',
  21.         ]);
  22.     }
  23. }