How to recreate the orders context in order to send out emails in Shopware 6
I am creating a console task to ship orders based on XML files (How to add a shipment (tracking code + change status to shipped) programmatically? ) which I import. Currently I am using $context = Context::createDefaultContext(); And create a shipment: $this->deliveryRepository->update([ [ ‘id’ => $deliveryId, ‘trackingCodes’ => [$trackingCode] ] ], $context); $context->addExtension( MailSendSubscriber::MAIL_CONFIG_EXTENSION, new… Read More How to recreate the orders context in order to send out emails in Shopware 6