You want to add custom referral code field in use customer account page. Then, you can create field for custom customer attribute.

Steps for Create a Customer Attribute for Data Patches Magento 2.

(1) <Vendorname>/<Modulename>/Setup/Patch/Data/AddCustomReferralCodeAttribute.php

(2) After use this commnad :

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f -j
php bin/magento indexer:reindex
php bin/magento cache:flush

[Note] : You can check admin panel in customer account information section and custom customer attribute in eav_attribute table that attribute creates successfully or not.

CynoInfotech

CynoInfotech was founded in 2019, in Ahmedabad, Gujrat. we have a trusted Web Development and Design Company that helps businesses in streamlining their operations through Magento 2 Extension and advanced modern technology solutions.

Let’s connect