How to unlock the payment information fields from user settings
If you've visited the User Settings page after filling in your payment information you may have seen that you can't edit most of the fields.
There are some security reasons behind this, like making sure that the payment information is always the same, for both the admin of the site and the user.
The admin can always edit this information from wp-admin > Users > Username, but the user can't.
If you feel like this is not the model you would like to follow, the only way to change this is by customizing the code. Here is a quick walkthrough on how to do it:
- Inspect the element and try to find something unique, like the ID of the field. (Screenshot 1)
- Search for it on the theme (Screenshot 2)
- Try to find the files that would have anything to do with what you're trying to edit, in this case functions-personal-info.php, html-payments.php, html-personal-info.php.
- Try to understand the logic behind it.
For example, in functions-personal-info.php there are those conditions like in Screenshot 2 which do not allow the field to be updated if it is already filled. This is a condition for the database update of the field.
Also, in html-personal-info.php there is a condition that makes it readonly if it was already filled, that also needs to be removed. (Screenshot 3)
- Try to do your changes in the child theme so you don't get them lost on the next updates. This requires advanced WordPress coding skills, it won't be very easy to explain step by step. For more info about child themes, please read this: https://developer.wordpress.org/themes/advanced-topics/child-themes/
- Do the same for the rest of the fields you need to edit.