Wordpress How to run a plugin function when a plugin is deactivated – WordPress April 7, 2011 Pramod T P Leave a comment <?php register_activation_hook(__FILE__, $function); //The function "register_deactivation_hook" allow you to run a //plugin function when the plugin is deactivated. ?>