File tree Expand file tree Collapse file tree
app/code/Magento/Checkout/Block/Checkout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -317,13 +317,13 @@ protected function getDefaultValue($attributeCode)
317317 {
318318 switch ($ attributeCode ) {
319319 case 'prefix ' :
320- return $ this ->getCustomer () ? $ this -> getCustomer ()-> getPrefix () : null ;
320+ return $ this ->getDefaultPrefix () ;
321321 case 'firstname ' :
322- return $ this ->getCustomer () ? $ this -> getCustomer ()-> getFirstname () : null ;
322+ return $ this ->getDefaultFirstname () ;
323323 case 'lastname ' :
324- return $ this ->getCustomer () ? $ this -> getCustomer ()-> getLastname () : null ;
324+ return $ this ->getDefaultLastname () ;
325325 case 'suffix ' :
326- return $ this ->getCustomer () ? $ this -> getCustomer ()-> getSuffix () : null ;
326+ return $ this ->getDefaultSuffix () ;
327327 case 'country_id ' :
328328 return $ this ->directoryHelper ->getDefaultCountry ();
329329 default :
@@ -387,4 +387,36 @@ protected function orderCountryOptions(array $countryOptions)
387387 }
388388 return array_merge ($ headOptions , $ tailOptions );
389389 }
390+
391+ /**
392+ * @return null|string
393+ */
394+ protected function getDefaultPrefix ()
395+ {
396+ return $ this ->getCustomer () ? $ this ->getCustomer ()->getPrefix () : null ;
397+ }
398+
399+ /**
400+ * @return null|string
401+ */
402+ protected function getDefaultFirstname ()
403+ {
404+ return $ this ->getCustomer () ? $ this ->getCustomer ()->getFirstname () : null ;
405+ }
406+
407+ /**
408+ * @return null|string
409+ */
410+ protected function getDefaultLastname ()
411+ {
412+ return $ this ->getCustomer () ? $ this ->getCustomer ()->getLastname () : null ;
413+ }
414+
415+ /**
416+ * @return null|string
417+ */
418+ protected function getDefaultSuffix ()
419+ {
420+ return $ this ->getCustomer () ? $ this ->getCustomer ()->getSuffix () : null ;
421+ }
390422}
You can’t perform that action at this time.
0 commit comments