0

I have an extension deployed to some Magento stores. Is there any way for me to know when the shopowner uninstalls/ removes my extension?

1

The only way I know of is to use the Uninstall.php file in your module's Setup directory to do whatever it is you want to do. This same question was answered here (with example): Magento 2: Run a uninstall script when module is uninstalled via command line?

One thing that isn't mentioned in the linked answer is that you're not guaranteed to have the user execute the uninstall command to remove your package. There are several ways to remove packages in Magento, and there isn't a way to guarantee your uninstallation code will be run.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.