I am trying to add my own plugin option to the Easy digital downloads plugin. The sample code is here:
I have added another register setting in the register_option
And in the form I get the option
$displaynotes = get_option( 'owlish_display_notes' );
and I have there two settings_fields callings
<?php settings_fields('owlish_license'); ?> <?php settings_fields('owlish_settings_group'); ?>
And in the form I have the checkbox above the submit button
<table class="form-table"> <tr> <th scope="row"><?php _e('Show notes?', 'owlish-textdomain'); ?></th> <td id="front-static-pages"> <fieldset> <legend class="screen-reader-text"><span><?php _e('Show notes?', 'owlish-textdomain'); ?></span></legend> <ul> <li><input type="checkbox" name="owlish_display_notes" value="1" id="owlish_display_notes" <?php checked('1'==$displaynotes); ?> /><label for="show_notes"> <?php _e('show notes', 'owlish-textdomain'); ?></label></li> </ul> </fieldset> </td> </tr> </table>
This is all I added to the EDD sample code. The problem is, I can only save one of those options. If I have the both settings_fields calls active, only the
owlish_display_notes are saved. If I comment the
settings_fields('owlish_settings_group'); out, then the license is saved, but not the notes.
This is driving me nuts. I am ok with the settings saved in each table row in the options for now, it just should work.
What am I missing here? Thanks so much