• 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

    https://wordpress.org/plugins/woocommerce/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

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