codestar-framework
codestar-framework copied to clipboard
how to migrate wordpress simple api setting data to codestar freamwork?
I am coding a plugin that uses the Star code framework It should be mentioned that I had written this plugin using WordPress API before. Now I want to integrate and make it more advanced, but I ran into a problem. The problem I have is that now when I want to apply the previous settings to the new settings that I made using the framework, the codes that I knew do not work properly. I want that if someone had installed the old version of the plugin and changed the plugin settings, now the changes will be automatically applied to the new version of the plugin that was built with the star code framework. The code I wrote to update the information in the new plugin settings is as follows:
$options = get_option( 'csf_optionsa' );
if( get_option('oldplugindata') === '1' ) {
update_option( $options['firstoption'], '1' );
}
The oldplugindata option is for the previous version of the plugin, which was a checkbox. Now I want that if someone has the old version of the plugin and updates it, the option defined in the Codestar framework will also be automatically changed. The above code does not work Thank you for helping me