Skip to content

Commit a00992e

Browse files
committed
Luma Plugin - v1.0.53
1 parent a791992 commit a00992e

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

Model/Service/Logic/Shipment.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use DHLParcel\Shipping\Model\Data\Api\Response\Shipment\Piece as PieceResponse;
2323
use DHLParcel\Shipping\Model\ResourceModel\Piece as PieceResource;
2424

25+
use Magento\Framework\Module\Manager as ModuleManager;
2526
use Magento\Sales\Api\OrderRepositoryInterface;
2627
use Magento\Sales\Model\Order\Shipment\TrackFactory;
2728
use Magento\Sales\Model\Order\Shipment\Track;
@@ -40,6 +41,7 @@ class Shipment
4041
protected $trackFactory;
4142
protected $helper;
4243
protected $capabilityService;
44+
protected $moduleManager;
4345

4446
public function __construct(
4547
Connector $connector,
@@ -53,7 +55,8 @@ public function __construct(
5355
OrderRepositoryInterface $orderRepository,
5456
TrackFactory $trackFactory,
5557
Data $helper,
56-
Capability $capabilityService
58+
Capability $capabilityService,
59+
ModuleManager $moduleManager
5760
) {
5861
$this->connector = $connector;
5962
$this->pieceFactory = $pieceFactory;
@@ -67,6 +70,7 @@ public function __construct(
6770
$this->trackFactory = $trackFactory;
6871
$this->helper = $helper;
6972
$this->capabilityService = $capabilityService;
73+
$this->moduleManager = $moduleManager;
7074
}
7175

7276
/**
@@ -97,7 +101,9 @@ public function getRequestData($order, $options, $pieces, $isBusiness)
97101
$shipmentRequest->accountId = $accountId;
98102
$shipmentRequest->options = $options;
99103
$shipmentRequest->pieces = $pieces;
100-
$shipmentRequest->application = 'Magento2';
104+
$shipmentRequest->application = $this->moduleManager->isEnabled('DHLParcel_ShippingHyva')
105+
? 'Magento2-Hyva'
106+
: 'Magento2';
101107

102108
return $shipmentRequest;
103109
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dhlparcel/magento2-plugin",
33
"description": "DHL Parcel plugin for Magento 2",
44
"type": "magento2-module",
5-
"version": "1.0.52",
5+
"version": "1.0.53",
66
"license": [
77
"OSL-3.0"
88
],

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
21-
<module name="DHLParcel_Shipping" setup_version="1.0.52">
21+
<module name="DHLParcel_Shipping" setup_version="1.0.53">
2222
<sequence>
2323
<module name="Magento_Shipping"/>
2424
<module name="Magento_Checkout"/>

0 commit comments

Comments
 (0)