Plugin uninstall function is not working
register_deactivation_hook() is launched when a plugin is deactivated. For plugin uninstall, there is register_uninstall_hook(). WordPress plugins can also have a file called uninstall.php that is ran whenever the plugin is uninstalled. To prevent the uninstall.php file from being triggered directly, the state of a constant called WP_UNINSTALL_PLUGIN should be checked before launching the codes for … Read more