Skip to content

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

Open

Description

@unfulvio

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.

Activity

  1. bekarice commented on Nov 17, 2016

    @bekarice
    Contributor

    not sure if we want to merge this into #41

  2. justinstern commented on Nov 17, 2016

    @justinstern
    Contributor

    good catch @bekarice it's the same issue

  3. modified the milestone: on Dec 20, 2016
  4. modified the milestones: v4.7.0, v5.0.0 on Jun 2, 2017
  5. modified the milestone: v5.0.0 on Aug 29, 2017
  6. added this to the v5.2.0 milestone on Dec 2, 2017
  7. removed this from the v5.2.0 milestone on Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions