Take a look at the documentation for register_uninstall_hook
. There is as well a register_deactivation_hook
function which can be usefull as well.
You could use them for calling a function which will remove the data from DB. But you should be careful and maybe let user check a checkbox to do so.
Related Posts:
- Update Multiple Post Meta for the Same Post In One call?
- Updating post meta for custom post types
- How can I add a custom meta value on file upload?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- How can I change the meta_key for a particular piece of information?
- Adding custom meta boxes to specified custom post type
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Remember the Meta Value With Radio Buttons
- Help to Create a Simple Plugin to make a post
- how to auto random increment for post view
- How to securely controlling data without keeping it in postmeta?
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- How to get post that has non zero or greater than zero meta value
- Storing values in Post Meta vs new tables
- wordpress last all added get meta value by post id
- Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
- Why do I get this “plugin does not have a valid header” error?
- Which method is best to enqueue scripts
- WordPress Capabilities: edit_user vs edit_users
- Function to activate WordPress theme inside a plugin
- What is the correct way to check if WP_Filesystem can write to a directory without aking for username / password?
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Pass A Value From Outside To A Plugin Variable
- shortcode doesn’t work
- Built in admin ajax hooks?
- Force plugin to fail activation
- Could someone please help me to add category id with in this query so this will return posts from a certain category?
- What are the benefit in adding hook in the init() hook?
- Plugin not saving values when placed in a folder within /wp-content/plugins
- How to integrate plugin in WordPress theme
- building plugin and it is displaying above plugins page
- Where to hook my plugin’s action
- load_theme_textdomain path
- Dynamic CSS Vs Inline Issues in Code any Way around in a WordPress Themes?
- Is license need for free wordpress plugin
- plugin development: problem with functions
- Getting a List of Categories for Use in a Plugin?
- Building plugin with changeable custom post type values…advice needed
- How to get all of the activate_plugin action parameters?
- Display update notification messages like ‘What’s New’
- How can I make 2 plugins that include different versions of a framework to both use the latest version?
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- Conditional attributes and logic per product category
- Why Is This Code Causing The Admin Bar to Disappear?
- WP_Terms_List_Table Quick Edit not working
- Git Hosting for WordPress SVN Plugin Repository [closed]
- Displaying Custom Sidebar Without Modifying Theme’s Core File?
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to exclude certain files from the plugin editor?
- Mass SQL WordPress Meta Key deletion
- Include a php file from another plugin
- How do I make a secure API call from a shortcode when a button is clicked?
- WordPress REST API Plugin Development – Add Custom Endpoint
- Hook into the rendering of a WordPress Template
- Can the uniqueness of the plugin file/plugin slug and version number be trusted?
- How can I concatenate variables to search results title? [closed]
- Save user total active time after login in wordpress [closed]
- WordPress gtag.js with User ID tracking
- Switch from wp-cron to a server cron job
- wp_loaded with static Singleton
- Calling a save function from a “submit” button
- WordPress plugin: efficient way to store large data
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Select Form Element Not Saving from Plugin Options
- My widget won’t update its values when save is clicked
- Can we give Pending as a Role to wp_insert_user?
- How to automatically activate users after registration without activation email?
- Seperate plugin and theme files
- Pass PHP variable to javascript
- Table of contents (TOC) plugin is not showing header tag
- Custom page from wp admin area
- Unexpected add action function in WP plugin
- Avada Live is broken on WP
- How to implement color picker from WordPress in my boilerplate plugin?
- custom post type plugin error [closed]
- get_post_meta shortcode returns empty field
- Make downloadable ebook read online without download option
- WordPress rewrite rule depend on meta values not ids
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- How to create meta fields with more than 1 relation?
- wordpress ajax pagination object value does not change
- Google analytic issue in wordpress
- Custom pages with plugin
- How to insert category name above post title in a featured pages plugin?
- What’s the preferred method of writing AJAX-enabled plugins?
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- Shortcode registered from a plugin not recognized
- How to change a specific page to custom page?
- wp_update_post call really slow when official Facebook plugin is installed
- How to set-up multiple cron task with wp_schedule_event so that they do not overlap?
- How use Dynamic hyperlink on each wordpress post?
- _e in wordpress +
- WordPress Code Access to Restricted Content without Registration
- Plugin version number after code rewrite [closed]
- Meta box not displaying on the plugin page
- public custom posts not showing in my wordpress plugin
- Allow manage_options capability for specific user only for specific plugin?