Home › Forums › Feature Requests › When a field is deleted, also delete previously saved data › Reply To: When a field is deleted, also delete previously saved data
On a small scale, and under the right conditions, this might be possible, but it is not scalable. On large sites it will fail due to the number of queries involved. If a site has fields with duplicate field names for different fields there is a hazard of deleting data that should not be deleted. These are just 2 of the potential reasons it’s never been done. Over the last 6+ years I’ve been helping on this forum this topic has come up more times than I can remember. There simply is no full-proof way that this can be done without causing other issues in many cases. The solutions that are available for removing data require that developers use specific development practices, like never using the same name for fields or using special prefixes for fields, and the list goes on. Practices that the average dev will never use until they realize the importance of using them, which is usually too late to do anything about it. They also require doing queries directly on the database without using WP functions because WP functions are inadequate for the tasks involved.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.