Get vendor attribute value

Hi! I have created a new attribute for the vendor (named “Alias”) and I can see it in the Settings (user update)
After submiting, how can I get the value of this attribute before saving it in database?

Hi,
Once the form is submitted, the attribute value is saved for the current vendor. If you mean getting this value somewhere in the code and you have the $vendor object (e.g. if it’s a template part on the vendor page or a hook where this object is passed as a parameter) you can get the attribute value this way:

$vendor->get_attribute_name_here();

In this case it may be:

$vendor->get_alias();

1 Like

Thank you ihor!