pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

'Remove all plugin data' setting not working without uninstall method #177

Open rvdsteege opened 5 months ago

rvdsteege commented 5 months ago

The core library adds a "Remove all plugin data on uninstall" setting on the settings page, even though the plugin might not actually hook register_uninstall_hook() or contain a uninstall.php file. When checked, users can expect the plugin data being removed on uninstall, while nothing will be removed if there are no uninstall methods implemented.

https://github.com/pronamic/wp-pay-core/blob/6bb82841cb2059e1eceedbafac31d73e5493c4c0/src/Settings.php#L68-L75

https://github.com/pronamic/wp-pay-core/blob/6bb82841cb2059e1eceedbafac31d73e5493c4c0/src/Admin/AdminSettings.php#L73-L87