Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper for uninstall scripts to delete all data brought by an extension #179

Open
unfulvio opened this issue Nov 17, 2016 · 2 comments
Open
Labels

Comments

@unfulvio
Copy link
Member

SkyVerge plugins so far do not feature an uninstall.php script. If this file is found in the plugin root, its code would be executed when a plugin is uninstalled from WordPress via WP Admin.

Generally our plugins don't leave a huge footprint, although we have some that leave behind setting options, or post types. With Memberships, that includes Action Scheduler, there are even comments. For Local Pickup Plus, we'll have a custom table. And so on.

It should be up to the customer decide whether wipe out all the data or just install the plugin and leave the data in db when uninstalling. Many plugins use the approach to include one option, like a checkbox, that, if ticked, when uninstalling the plugin all the data gets deleted, as a form of opt in.

We could framework such setting (use a standard option name like the one storing the plugin version) and a simple method to retrieve whether the option value is yes or no. Where to place this setting could be an individual plugin's burden, but we could also think of a helper to output the setting as long as it's a simple solution.

@bekarice
Copy link
Contributor

not sure if we want to merge this into #41

@justinstern
Copy link
Contributor

good catch @bekarice it's the same issue

@ChaseWiseman ChaseWiseman modified the milestone: 4.7.0 Dec 20, 2016
@ChaseWiseman ChaseWiseman modified the milestones: v4.7.0, v5.0.0 Jun 2, 2017
@ChaseWiseman ChaseWiseman modified the milestone: v5.0.0 Aug 29, 2017
@ChaseWiseman ChaseWiseman added this to the v5.2.0 milestone Dec 2, 2017
@ChaseWiseman ChaseWiseman removed this from the v5.2.0 milestone Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants