Skip to content

Commit 3b84172

Browse files
committed
Small refactoring
1 parent c9b5250 commit 3b84172

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,11 @@ public function afterDelete(CustomerRepository $subject, $result, CustomerInterf
161161
public function afterGetById(CustomerRepository $subject, CustomerInterface $customer)
162162
{
163163
$extensionAttributes = $customer->getExtensionAttributes();
164-
164+
$storeId = $this->storeManager->getStore()->getId();
165+
$customer->setStoreId($storeId);
165166
if ($extensionAttributes === null) {
166167
/** @var CustomerExtensionInterface $extensionAttributes */
167168
$extensionAttributes = $this->extensionFactory->create(CustomerInterface::class);
168-
$storeId = $this->storeManager->getStore()->getId();
169-
$customer->setStoreId($storeId);
170169
$customer->setExtensionAttributes($extensionAttributes);
171170
}
172171
if ($extensionAttributes->getIsSubscribed() === null) {

0 commit comments

Comments
 (0)