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

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_action('wpdatatables_after_uninstall_method', 'custom_uninstall_cleanup');
add_action('wpdatatables_after_uninstall_method', 'custom_uninstall_cleanup');
add_action('wpdatatables_after_uninstall_method', 'custom_uninstall_cleanup');

Parameters

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

Examples

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
// 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');
// 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');
// 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');