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 7
7
8
8
use Magento \Catalog \Api \Data \EavAttributeInterface ;
9
9
use Magento \Framework \Api \AttributeValueFactory ;
10
+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
10
11
use Magento \Framework \Stdlib \DateTime \DateTimeFormatterInterface ;
12
+ use Magento \Quote \Api \Data \AddressInterface ;
11
13
12
14
/**
13
15
* Customer attribute model
14
16
*
15
17
* @method int getSortOrder()
16
18
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17
19
*/
18
- class Attribute extends \Magento \Eav \Model \Attribute
20
+ class Attribute extends \Magento \Eav \Model \Attribute implements ResetAfterRequestInterface
19
21
{
20
22
/**
21
23
* Name of the module
@@ -221,4 +223,14 @@ public function __wakeup()
221
223
$ objectManager = \Magento \Framework \App \ObjectManager::getInstance ();
222
224
$ this ->indexerRegistry = $ objectManager ->get (\Magento \Framework \Indexer \IndexerRegistry::class);
223
225
}
226
+
227
+ /**
228
+ * @inheritDoc
229
+ */
230
+ public function _resetState (): void
231
+ {
232
+ if ($ this ->getName () === AddressInterface::KEY_TELEPHONE ) {
233
+ $ this ->unsetData ();
234
+ }
235
+ }
224
236
}
Original file line number Diff line number Diff line change @@ -990,6 +990,5 @@ public function _resetState(): void
990
990
{
991
991
$ this ->attributesPerSet = [];
992
992
$ this ->_attributeData = [];
993
- $ this ->attributes = [];
994
993
}
995
994
}
You can’t perform that action at this time.
0 commit comments