Magento 2: Get order ID and Date in DHL Shipping Carrier model
Pregunta
I have a requirement to attach the order ID and order date to the xml request (ShipmentRequest) located in /magento/dhl/model/Carrier.php
Is there a way to retrieve the order ID linked to this shipping request?
Solución
I worked it out using:
$orderNumber = $rawRequest->getOrderShipment()->getOrder()->getIncrementId();
$orderDate = $rawRequest->getOrderShipment()->getOrder()->getCreatedAt();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange