Title: Setting options programatically
Last modified: March 27, 2018

---

# Setting options programatically

 *  [motivmedia](https://wordpress.org/support/users/motivmedia/)
 * (@motivmedia)
 * [8 years ago](https://wordpress.org/support/topic/setting-options-programatically/)
 * Hi.
    I tried making default settings before actually installing the plugin (mainly
   just the message text). It is a serialized array in wp_options cookie_notice_options,
   the specific field is message_text. So far so good. But when I install the plugin
   afterwards it seems to overwrite the field. I even tried to just copy the whole
   option_value of cookie_notice_options, still gets overwritten. However, after
   updating or reinstalling the plugin, the options are retained.
 * I’m not sure how this is done, so… any tipps? 🙂
 * Cheers
    Floutsch

The topic ‘Setting options programatically’ is closed to new replies.

 * ![](https://ps.w.org/cookie-notice/assets/icon-256x256.png?rev=2466385)
 * [Cookie Notice & Compliance for GDPR / CCPA](https://wordpress.org/plugins/cookie-notice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [motivmedia](https://wordpress.org/support/users/motivmedia/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/setting-options-programatically/)
 * Status: not resolved