Skip to content

Deactivating the plugin deletes all saved settings #36

Description

@jdevalk

Problem

Temporarily deactivating Simple Analytics deletes all 18 plugin options, including custom domains and exclusion rules. Reactivating restores defaults rather than the user's configuration.

Reproduction

  1. Configure a custom domain and at least one exclusion rule.
  2. Deactivate the plugin in WordPress.
  3. Reactivate it and inspect its settings.

Actual: saved configuration is gone.
Expected: deactivation preserves configuration; deleting/uninstalling the plugin performs cleanup.

Evidence

Reproduced with plugin 1.109, WordPress 7.1 and PHP 8.4.25 using the installed plugin and WordPress deactivate_plugins() against an isolated temporary options table on the same server: 18 options before, zero afterward. The live plugin was left active.

src/Plugin.php:39 registers onUninstall() as the deactivation callback; that callback deletes every SettingName option.

Acceptance

Preserve settings across deactivation/reactivation and retain deliberate cleanup on uninstall, including appropriate multisite handling.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions