function my_plugin_remove_database()
{
global $wpdb;
$db_table_name = $wpdb->prefix . 'sandbox'; // table name
$sql = "DROP TABLE IF EXISTS $db_table_name";
$rslt=$wpdb->query($sql);
}
register_deactivation_hook( __FILE__, 'my_plugin_remove_database' );
Related Posts:
- What are the common security flaws I need to look for? [closed]
- Making my plugin multi-site compatible
- Creating 20,000 Posts or Pages using a .csv file?
- What’s the easiest way to duplicate an entire navigation menu?
- Updating WooCommerce variable product stock issue
- How can I get a list of plugins and which blogs are using them?
- What is the easiest way to implement cascading database upgrade for my plugin?
- Plugin Development sqlite or WordPress’ database
- Retrieving a Value from a wp-database
- Problem with creating tables for Plugin
- Prevent duplicate records in plugin table
- WordPress WPforms customization
- How do I run SQL queries on a WordPress web page? [closed]
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- How to create multiple database tables on plugin activation?
- Does deleting a Plugin via the WordPress admin ‘completely’ remove the code?
- Speeding SQL queries for a large database?
- correct validate and sql query
- correct sql query
- SQL query, error
- $wpdb update query in plugin only updating one column
- Woocommerce Backend Search by Title and SKU
- problem with sql query
- Using AJAX to run SQL statement and populate dropdown
- Adding CASE in WP_Query
- JOIN and SUM different statement results (Mailster Database)
- How to get specific column data conditionally in database in WordPress?
- Memcaching recurring SQL Queries
- add products to WordPress site automatically
- How to get database connection details without longing to cpanel in WordPress?
- Performing CRUD operations on front end in wordpress
- Display a number value from mysql query in WP
- Looping the data from WordPress database using foreach
- How To Toggle User_Meta in frontend in a form using PHP
- Get and Update Most Meta Value as an array in HTML form
- WordPress filter from custom table is not working properly
- errno: 150 “Foreign key constraint is incorrectly formed” [closed]
- Create Array from data in the OPTIONS table
- Custom Table doesn’t create on plugin activation
- correct validate inputs
- Get all the related data from WordPress DB
- How to change and edit users according to the extension in the URL
- Remove posts that start with similar words (like a delete duplicate posts plugin)
- Change comments ordering by custom value
- How to verify/test that a custom built wordpress theme is as secure as possible?
- Fatal error in form display plugin
- Invalid plugin installation directory, Google Analytics [closed]
- Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?
- Image change on hover
- Need to show featured service boxes on my company website
- Why do plugins often ask to add in to templates?
- Is it fair to use MIT licensed code in WordPress plugins? [closed]
- Plugin retrieving results even after uninstallation
- Editing a text file from plugin menu
- Does using `add_action( ‘init’…` cause performance issues?
- Setting Up PHP Workflow in WordPress
- How to add an element right after the article using jQuery?
- How to reset wordpress but not plugins and settings
- AJAX Load more start with x posts
- php code crashes site – possible syntax error
- White screen after plugins upgrade
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- do_action Nested List
- Deactivate JS Script in Plugin Shortcode
- How to automatically add edit link on frontpage post of any wordpress theme?
- Child Themes and Updating Parent Theme
- How to write “alt” tag in image for wordpress code?
- plugin active error
- How to get a list of bundled products using wp_query in woocommerce
- WordPress reliability
- Allow only Admin role to access plugin settings/options page
- Is it safe to use admin-ajax.php in the frontend?
- Include a php file from another plugin
- Getting a Page via its post-name using WP REST API v2 and Postman
- How to get all posts belongs to a user between a certain date
- Add estimated value for a post according to the number of words
- Passing stored variables to add_filter
- Does heavy theme and plugins affect server’s response time? [closed]
- How can I delete a wordpress widget instance?
- order posts by `meta_key`, Does not display posts that does not have `meta_key`
- Repeated Output in Widget
- How do I make a secure API call from a shortcode when a button is clicked?
- A question about register_activation hook
- Adding Static Image to WooCommerce Content-Single-Product template
- plugin shortcode not working on ajax request call
- Displayed content disappears when adding attributes to shortcode
- Modify page title and subtitle with a plugin
- One sub site is slow while all others load fine, same theme & plugins [closed]
- Issues with a WP plugin menu system
- How to protect WordPress from security scanner [closed]
- Add back to post link on blank comment post error page
- override filter in a plugin
- Check filter defined or not?
- How to track clicks
- How to load different homepage on Mobile.?
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- WordPress REST API Plugin Development – Add Custom Endpoint
- Shortcode Placeholder Plugin
- Where to find the code used to render a page that has a shortcode and a template defined?
- WordPress 4.3 broke meta redirect (with url params plugin)