I have a wordpress membership site which i am developing.
I want to be able to give users the ability to close there account if they no longer wish to use it.
I would use wp_delete_user but we wish to keep the data of the user for future marketing.
My idea is to give them the option to close there account, but when doing this all it actually does is change their role to “pending” or something similar.
Is there a wordpress function / hook i can use which will allow the user to do this within the front end of the site in their profile area?
Cheers Dan
Managed to figure this out so thought i would post it up incase others had the same issue: