custom/plugins/CioPodProducts/src/Subscriber/StorefrontRenderSubscriber.php line 18

Open in your IDE?
  1. <?php
  2. namespace CioPodProducts\Subscriber;
  3. use Shopware\Storefront\Event\StorefrontRenderEvent;
  4. use Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPage;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class StorefrontRenderSubscriber implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents(): array
  9.     {
  10.         return [
  11.             StorefrontRenderEvent::class => 'onStorefrontRender'
  12.         ];
  13.     }
  14.     public function onStorefrontRender(StorefrontRenderEvent $event)
  15.     {
  16.         if (array_key_exists('page'$event->getParameters())) {
  17.             // checkout confirm only!
  18.             $page $event->getParameters()['page'];
  19.             if ($page instanceof CheckoutConfirmPage) {
  20.                 $page->setHideShippingAddress(false);
  21.             }
  22.         }
  23.     }
  24. }