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()
8787 {
8888 $ result = parent ::afterDelete ();
8989
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 ;
9898
99+ case ScopeConfigInterface::SCOPE_TYPE_DEFAULT :
100+ $ attribute ->setData ('multiline_count ' , 2 );
101+ break ;
102+ }
103+ $ attribute ->save ();
99104 return $ result ;
100105 }
101106}
You can’t perform that action at this time.
0 commit comments