Closed alekseyn1 closed 4 years ago
Fixes #72 @hlashbrooke if you have a moment, please pop a thumbs up or thumbs down if you agree with this update, and I'll review with a view to merge.
It looks alright, but what I would much rather see is the names all of the options that the plugin sets stored in an object (do we not do that already?), then we can loop through that array/object and call delete_option()
for each one. I know that's more queries in the end, but I always prefer using the available WP API's instead of raw SQL queries where possible - I think that's a better practice to be taught in a plugin template like this.
@alekseyn1 do you think you could update the uninstall procedure to use the stored option names and delete_option
instead?
I've tested this to see if it will enumerate through the options table & it works. Have not actually tried an uninstall to see if it drops the options.
Proposed uninstall.php