File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 77
88use Magento \Catalog \Api \Data \EavAttributeInterface ;
99use Magento \Framework \Api \AttributeValueFactory ;
10+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
1011use 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}
Original file line number Diff line number Diff line change @@ -990,6 +990,5 @@ public function _resetState(): void
990990 {
991991 $ this ->attributesPerSet = [];
992992 $ this ->_attributeData = [];
993- $ this ->attributes = [];
994993 }
995994}
You can’t perform that action at this time.
0 commit comments