Skip to content

Commit

Permalink
Remove plugin settings matching old DB key on uninstall (#67)
Browse files Browse the repository at this point in the history
Summary:
This changeset makes sure that both database entries containing the plugin settings are removed when uninstalling the plugin. Previously, only the current setting DB entry was being removed when uninstalling the plugin.

Because the plugin copies values from the old DB entry (`facebook_config`) to the new one (`facebook_business_extension_config`) when being run, the plugin never returns to an "empty" state when reinstalled on a machine that had an older version of the plugin which used the `facebook_config` options DB key.

Pull Request resolved: #67

Reviewed By: tzahgr

Differential Revision: D68435405

Pulled By: vahidkay-meta

fbshipit-source-id: 001dcb230b49a3d3cbd77dae423a78fb4fac87e0
  • Loading branch information
iodic authored and facebook-github-bot committed Jan 21, 2025
1 parent 3b2c6fa commit ad9eaeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@
}

delete_option( FacebookPluginConfig::SETTINGS_KEY );
delete_option( FacebookPluginConfig::OLD_SETTINGS_KEY );

delete_user_meta( get_current_user_id(), FacebookPluginConfig::ADMIN_IGNORE_PIXEL_ID_NOTICE );

0 comments on commit ad9eaeb

Please sign in to comment.