I want to use your Customer Attributes in scripts/customizations. How may I get their values from the code?
To get the Customer Attributes values from the code, you may use the strings provided below:
$сustomerRepository = $objectManager->get('Magento\Customer\Api\CustomerRepositoryInterface');
$сustomer = $сustomerRepository->getById();
$сustomer->getCustomAttribute('')->getValue()
Kindly note that the customer ID should be passed to '...->getById( )' to retrieve the attribute for a specific customer, as well as the attribute code should be specified in '...->getCustomAttribute('')' to fetch the attribute.