Purpose
Explain how PayPress handles data removal when the plugin is deleted.
Overview
PayPress includes uninstall behavior controlled by the merchant setting for deleting plugin data on uninstall.
How It Works
When deletion of plugin data is enabled and WordPress runs plugin uninstall, PayPress removes plugin-created local data according to uninstall.php. If the setting is not enabled, data should be preserved.
Important Components
uninstall.php.- Delete plugin data setting.
- Custom tables.
- WordPress options.
- Plan posts/meta where applicable.
- Installation UUID option.
- Stripe configuration options.
- Webhook logs/events.
Data Flow
WordPress deletes plugin -> uninstall routine checks setting -> if enabled, removes configured tables/options/plugin data -> if disabled, preserves local data.
Security Considerations
Uninstall data deletion is destructive. It should only happen when explicitly enabled by an administrator.
Known Limitations
Stripe account data is not deleted by WordPress uninstall. Stripe payments, subscriptions, customers, invoices, and webhooks remain in Stripe unless managed there.