User updating their profile wipes my custom fields
I see two problems in your code. The first one is the user capability level and the second one is how you’re saving the data. You can fix the first one by setting the capability requirement in your saving function higher, some capability that only administrators have. Regarding edit_usercapability, WordPress Capabilities: edit_user vs edit_users The … Read more