Skip to content

Commit fc146cf

Browse files
committed
ACP2E-860: The attribute values are storing correctly only if it's 'Show Company' property is 'Optional' for 'Main Website' for Multistore
- Fixed the issue.
1 parent e897727 commit fc146cf

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Sales\Plugin\Model\Customer\Metadata;
8+
9+
use Magento\Eav\Model\Config;
10+
11+
class AddressMetadata
12+
{
13+
/**
14+
* @var Config
15+
*/
16+
private $eavConfig;
17+
18+
/**
19+
* Initialize eav config model
20+
*
21+
* @param Config $eavConfig
22+
*/
23+
public function __construct(
24+
Config $eavConfig
25+
) {
26+
$this->eavConfig = $eavConfig;
27+
}
28+
29+
/**
30+
* Reset the eav attributes
31+
*
32+
* @return void
33+
*/
34+
public function beforeGetAllAttributesMetadata()
35+
{
36+
$this->eavConfig->clear();
37+
}
38+
}

app/code/Magento/Sales/etc/adminhtml/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,7 @@
5252
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
5353
<plugin name="orderGridCollectionFilterPlugin" type="Magento\Sales\Plugin\Model\ResourceModel\Order\OrderGridCollectionFilter"/>
5454
</type>
55+
<type name="Magento\Customer\Model\Metadata\AddressMetadata">
56+
<plugin name="OrderDetailUpdateAddress" type="Magento\Sales\Plugin\Model\Customer\Metadata\AddressMetadata"/>
57+
</type>
5558
</config>

0 commit comments

Comments
 (0)