Re-enabling plugin reverts options to defaults
-
If you deactivate then re-activate the plugin, the options reset to defaults.
In the
set_default_values()method in the activation hook I see:
update_option('ip2location_redirection_api_key', '');which will always update the value if it has already been added.Is there a reason to not set default values with
add_option()instead? This way existing options/settings will not be updated. Like:if (!get_option('ip2location_redirection_api_key')) { add_option('ip2location_redirection_api_key', ''); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Re-enabling plugin reverts options to defaults’ is closed to new replies.