Uninstalling a plugin: delete all options with specific prefix
Objective As all plugin developer, I want to delete all options that begin with the same prefix. Backstory I’ve developed a plugin that stores data in the options. When the user uninstalls the plugin, the uninstall.php in the plugin executes the following code: if ( !defined( ‘WP_UNINSTALL_PLUGIN’ ) ) { exit; } delete_option( ‘myplugin_some_opt_1’ ); … Read more