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

Add "delete all data" option when removing CC #142

Open
timbocode opened this issue Dec 12, 2019 · 3 comments
Open

Add "delete all data" option when removing CC #142

timbocode opened this issue Dec 12, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@timbocode
Copy link
Contributor

timbocode commented Dec 12, 2019

Is your feature request related to a problem? Please describe.
Currently WC and CC do not delete data / database tables when they are uninstalled. This can leave a lot of useless data clogging up the database.

Describe the solution you'd like
An option button that gives the user the choice of whether or not they want the data to be removed, set to "no" by default. An option to export the data (in a format that can be reimported) before removing it would also be useful.

Describe alternatives you've considered
It's possible to remove the data manually from the database but this should not be necessary and would be beyond the means of most end users.

Additional context
WC and CC both give a scary warning that data will be deleted but this doesn't happen. This warning is misleading.

See also #136 (comment)

@ghost
Copy link

ghost commented Dec 13, 2019

Agreed this is a good idea. The current warning message is certainly misleading. It should reflect exactly what will happen, eg

  1. If the box in settings is not ticked it could say: "All your products, records and settings will NOT be deleted from the database"
  2. If the box is ticked in settings it could say: "WARNING. You have enabled the option in settings to delete your database tables. This will delete all your products, records and settings. Do you want to continue? Y/N"

@bahiirwa bahiirwa added this to the Version 1.1.0 milestone Dec 22, 2019
@bahiirwa bahiirwa added bug Something isn't working Needs PR Issue to be fixed. Needs a PR. labels Dec 28, 2019
@bahiirwa
Copy link
Collaborator

bahiirwa commented Mar 6, 2020

Screenshot

Screenshot 2020-03-06 at 23 11 32

This said bug stems from the WP/CP core for each plugin. See wp-admin/plugins.php

The expectation for this is that all plugins handle their data in the uninstall.php file in each individual plugin.

If we intend to proceed as above suggested by @simplycomputing, we need to tap the
add_action('delete_plugin', $plugin_file ); that Fires immediately before a plugin deletion attempt in wp-admin/includes/plugin.php to have those rules set.

@timbocode
Copy link
Contributor Author

I do agree this needs doing. The message it currently gives is just wrong. But I also think this can wait until after beta1 at the very least. It's currently scheduled for 1.1.0 and at present, I'm happy to leave it at that.

@timbocode timbocode added enhancement New feature or request and removed Needs PR Issue to be fixed. Needs a PR. bug Something isn't working labels Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants