File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
app/code/Magento/Customer/Model/Customer Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -384,11 +384,16 @@ private function canShowAttribute(AbstractAttribute $customerAttribute)
384
384
return $ customerAttribute ->getIsVisible ();
385
385
}
386
386
387
- $ canShowOnForm = is_array ($ customerAttribute ->getUsedInForms ()) &&
388
- (
389
- (in_array ('customer_account_create ' , $ customerAttribute ->getUsedInForms ()) && $ isRegistration ) ||
390
- (in_array ('customer_account_edit ' , $ customerAttribute ->getUsedInForms ()) && !$ isRegistration )
391
- );
387
+ if ($ customerAttribute ->getEntityType ()->getEntityTypeCode () === 'customer ' ) {
388
+ $ canShowOnForm = is_array ($ customerAttribute ->getUsedInForms ()) &&
389
+ (
390
+ (in_array ('customer_account_create ' , $ customerAttribute ->getUsedInForms ()) && $ isRegistration ) ||
391
+ (in_array ('customer_account_edit ' , $ customerAttribute ->getUsedInForms ()) && !$ isRegistration )
392
+ );
393
+ } else {
394
+ $ canShowOnForm = is_array ($ customerAttribute ->getUsedInForms ()) &&
395
+ in_array ('customer_address_edit ' , $ customerAttribute ->getUsedInForms ());
396
+ }
392
397
393
398
return ($ this ->userScope === self ::ADMIN_SCOPE && $ canShowOnForm ) ||
394
399
($ this ->userScope === self ::FRONTEND_SCOPE && $ canShowOnForm && $ customerAttribute ->getIsVisible ());
You can’t perform that action at this time.
0 commit comments