Skip to content

Commit 27b0431

Browse files
author
Oleksandr Karpenko
committed
2 parents bbd267c + 49b9f29 commit 27b0431

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function __construct(
9898
ManagerInterface $messageManager,
9999
Escaper $escaper,
100100
AppState $appState,
101-
CustomerSession $customerSession = null
101+
CustomerSession $customerSession
102102
) {
103103
$this->_customerVat = $customerVat;
104104
$this->_customerAddress = $customerAddress;
@@ -109,9 +109,6 @@ public function __construct(
109109
$this->escaper = $escaper;
110110
$this->appState = $appState;
111111
$this->customerSession = $customerSession;
112-
if ($this->customerSession === null) {
113-
$this->customerSession = \Magento\Framework\App\ObjectManager::getInstance()->get(CustomerSession::class);
114-
}
115112
}
116113

117114
/**

app/code/Magento/Customer/etc/di.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,4 @@
307307
<type name="Magento\Customer\Api\CustomerRepositoryInterface">
308308
<plugin name="transactionWrapper" type="Magento\Customer\Model\Plugin\CustomerRepository\TransactionWrapper" sortOrder="-1"/>
309309
</type>
310-
<type name="Magento\Customer\Observer\AfterAddressSaveObserver">
311-
<arguments>
312-
<argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session</argument>
313-
</arguments>
314-
</type>
315310
</config>

0 commit comments

Comments
 (0)