dbDelta not adding additional columns in plugin database update
After trial and error, here is the code that works: function installer(){ include(‘installer.php’); } register_activation_hook( __file__, ‘installer’ ); //executes installer php when installing plugin to create new database //database update checkdate function myplugin_update_db_check() { global $xenon_result_db_version; if ( get_option( ‘xenon_result_db_version’ ) != $xenon_result_db_version ) { installer(); } } add_action( ‘plugins_loaded’, ‘myplugin_update_db_check’ ); The installer.php looks … Read more