When deactivating GiveWP and choosing to remove GiveWP data, the uninstaller can delete site options that were not added by GiveWP.
This is because GiveWP is doing a LIKE comparison when querying the database, for the generic word give. See this block from uninstall.php, line 119:
// Get all options.
$give_option_names = $wpdb->get_col(
$wpdb->prepare(
"
SELECT option_name
FROM {$wpdb->options}
WHERE option_name LIKE '%s'
",
'%give%'
)
);
I ran the uninstall on a website with an option not added by GiveWP (in this instance, givebutter-widget-account), and confirmed that GiveWP's uninstaller also removed the non-GiveWP setting.
Ideally, GiveWP should instead compare option names to a list of known GiveWP options, and only delete options if they were added by GiveWP (or one of the GiveWP add-ons).
When deactivating GiveWP and choosing to remove GiveWP data, the uninstaller can delete site options that were not added by GiveWP.
This is because GiveWP is doing a
LIKEcomparison when querying the database, for the generic wordgive. See this block fromuninstall.php, line 119:I ran the uninstall on a website with an option not added by GiveWP (in this instance,
givebutter-widget-account), and confirmed that GiveWP's uninstaller also removed the non-GiveWP setting.Ideally, GiveWP should instead compare option names to a list of known GiveWP options, and only delete options if they were added by GiveWP (or one of the GiveWP add-ons).