File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
app/code/Magento/Customer/Model/Config/Backend/Address Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,20 @@ public function afterDelete()
87
87
{
88
88
$ result = parent ::afterDelete ();
89
89
90
- if ( $ this ->getScope () == \ Magento \ Store \ Model \ScopeInterface:: SCOPE_WEBSITES ) {
91
- $ attribute = $ this ->_eavConfig -> getAttribute ( ' customer_address ' , ' street ' );
92
- $ website = $ this -> _storeManager -> getWebsite ( $ this -> getScopeCode ());
93
- $ attribute -> setWebsite ( $ website );
94
- $ attribute ->load ( $ attribute -> getId () );
95
- $ attribute ->setData ( ' scope_multiline_count ' , null );
96
- $ attribute ->save ( );
97
- }
90
+ $ attribute = $ this ->_eavConfig -> getAttribute ( ' customer_address ' , ' street ' );
91
+ switch ( $ this ->getScope ()) {
92
+ case \ Magento \ Store \ Model \ScopeInterface:: SCOPE_WEBSITES :
93
+ $ website = $ this -> _storeManager -> getWebsite ( $ this -> getScopeCode () );
94
+ $ attribute ->setWebsite ( $ website );
95
+ $ attribute ->load ( $ attribute -> getId () );
96
+ $ attribute ->setData ( ' scope_multiline_count ' , null );
97
+ break ;
98
98
99
+ case ScopeConfigInterface::SCOPE_TYPE_DEFAULT :
100
+ $ attribute ->setData ('multiline_count ' , 2 );
101
+ break ;
102
+ }
103
+ $ attribute ->save ();
99
104
return $ result ;
100
105
}
101
106
}
You can’t perform that action at this time.
0 commit comments