Delete Plugin Options with Verify


The process to uninstall an plugin is documented here: . The sample code there is:

// if uninstall.php is not called by WordPress, die
if (!defined('WP_UNINSTALL_PLUGIN')) {

$option_name = 'wporg_option';


// for site options in Multisite

But I can find no code samples on how to ask the user if they want to remove the plugin’s options from the wp-options table.

If I use the uninstall.php process to delete my plugin, is there an accepted/best practices way to ask the user if they want to also delete the plugin’s options? There may be an instance where the user might want to reinstall later, and not have to re-do all of the options.

Rick Hellewell 1 year 2019-11-21T13:42:25-05:00 0 Answers 71 views 0

Leave an answer