Skip to content

Commit 9704935

Browse files
committed
ACPT-1191: Fix Quote related issues on Application Server
1 parent 48f9e73 commit 9704935

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

app/code/Magento/Customer/Model/Attribute.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77

88
use Magento\Catalog\Api\Data\EavAttributeInterface;
99
use Magento\Framework\Api\AttributeValueFactory;
10+
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1011
use Magento\Framework\Stdlib\DateTime\DateTimeFormatterInterface;
12+
use Magento\Quote\Api\Data\AddressInterface;
1113

1214
/**
1315
* Customer attribute model
1416
*
1517
* @method int getSortOrder()
1618
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1719
*/
18-
class Attribute extends \Magento\Eav\Model\Attribute
20+
class Attribute extends \Magento\Eav\Model\Attribute implements ResetAfterRequestInterface
1921
{
2022
/**
2123
* Name of the module
@@ -221,4 +223,14 @@ public function __wakeup()
221223
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
222224
$this->indexerRegistry = $objectManager->get(\Magento\Framework\Indexer\IndexerRegistry::class);
223225
}
226+
227+
/**
228+
* @inheritDoc
229+
*/
230+
public function _resetState(): void
231+
{
232+
if ($this->getName() === AddressInterface::KEY_TELEPHONE) {
233+
$this->unsetData();
234+
}
235+
}
224236
}

app/code/Magento/Eav/Model/Config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,5 @@ public function _resetState(): void
990990
{
991991
$this->attributesPerSet = [];
992992
$this->_attributeData = [];
993-
$this->attributes = [];
994993
}
995994
}

0 commit comments

Comments
 (0)