Title: Why need init_settings() function for plugins?
Last modified: August 22, 2016

---

# Why need init_settings() function for plugins?

 *  [KrisTees](https://wordpress.org/support/users/kristees/)
 * (@kristees)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/why-need-init_settings-function-for-plugins/)
 * Im creating a Woocommerce payment gateway plugin and I see in lots of other plugins
   that the constructor also calls for the method init_settings()
    `$this->init_settings();`
   Why is this needed? My settings are displayed with init_form_fields() and saved
   with process_admin_options action. So why is the init_settings needed and what
   does it do? Fields under my plugin settings get saved and always have new values
   when I navigate back to that settings page. I see that paypal plugin also has
   this method run in the constructor, but I cant find any relevant information 
   about why is it necessary. I have also raised the question here: [http://wordpress.stackexchange.com/questions/177611/why-need-init-settings-function](http://wordpress.stackexchange.com/questions/177611/why-need-init-settings-function)
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 1 replies (of 1 total)

 *  [Gabriel Reguly](https://wordpress.org/support/users/gabriel-reguly/)
 * (@gabriel-reguly)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/why-need-init_settings-function-for-plugins/#post-5770914)
 * Well, the docs say you need to call it.
 *  `your settings which are then loaded with init_settings().`
 * [http://docs.woothemes.com/document/payment-gateway-api/](http://docs.woothemes.com/document/payment-gateway-api/)

Viewing 1 replies (of 1 total)

The topic ‘Why need init_settings() function for plugins?’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [development](https://wordpress.org/support/topic-tag/development/)
 * [plugin-development](https://wordpress.org/support/topic-tag/plugin-development/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gabriel Reguly](https://wordpress.org/support/users/gabriel-reguly/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/why-need-init_settings-function-for-plugins/#post-5770914)
 * Status: not resolved