Uninstall
Last updated
Last updated
The uninstall logic is some logic executed when the plugin is executed.
By default, Launchpad doesn't ship with a way to execute logic on uninstall.
However, it is possible to install a module to have uninstall logic.
To install you need to run the following command: composer require wp-launchpad/uninstaller-take-off
.
Once the command finished being executed should have been added to your project and it is now possible to take advantage of the uninstall module.
In Launchpad, to create a logic which will be executed when the plugin is uninstalled, we need to use an Uninstaller.
To create an uninstaller, any class can be used as the only requirement is to inside the docblock of at least one of the methods:
Once the uninstaller class is created, it needs to be registered on a service provider to be loaded.
For that it is important to first using interface and trait:
It is then possible to have access to the inside :