I am working on a plugin update and have changed the settings option_name and key.
I would like that the old options are transferred to the new option_name.
The old option name is: plugin_options
The new being: plugin_settings_general
The keys have changed too, from "ga_accountId" to "ga_account_id".
I looked at $wpdb and update_option but could not working any thing out that worked.
This should work if I did not need to change the keys too.
// Get entire array
$plugin_options = get_option( 'plugin_options' );
// Update entire array
update_option( 'plugin_name_settings_general', $plugin_options );
// Delete old array
delete_option( 'plugin_options' );