wpdatatables_after_uninstall_method

Contents

Description

This action is triggered after the plugin is uninstalled. It provides a hook to perform additional cleanup tasks, such as removing custom database tables, deleting specific plugin-related files, or performing other uninstallation-related tasks.

Usage

add_action('wpdatatables_after_uninstall_method', 'custom_uninstall_cleanup');

Parameters

  • None
    This action does not pass any parameters to the callback function.

Examples

// Callback function for wpdatatables_after_uninstall_method action
function custom_uninstall_cleanup() {
    global $wpdb;

    // Example: Remove a custom table created by the plugin
    $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}custom_plugin_table");

    // Example: Delete a custom option
    delete_option('custom_plugin_setting');
}

add_action('wpdatatables_after_uninstall_method', 'custom_uninstall_cleanup');