I have created a custom attribute for customer https://prnt.sc/tb68lv The values are getting saved in the database. i have cross checked it again after opening the customer for edit and the values were present. But when i create an order for a customer, i found this field to be blank in Account information tab. https://prnt.sc/tb6f1k How can i get the value of this field already displayed like email and other info. Please help
1 Answer
You can get value like that.
$customer = $this->customerRepository->getById($customerId);
$customer->getResource()->getAttribute('payment_type')->getFrontend()->getValue($customer);