• Resolved webtecky

    (@webtecky)


    Would it be possible to have the plugin running the database migration on ‘admin_init’ instead of ‘init’? We have a dockerized environment with multiple docker instances for public, but only 1 for admin. This way would avoid calling the same process from different containers and crashing the site.

    Thank you for the consideration!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ruel

    (@ruel214)

    Hi there,

    Thanks for reaching out.

    I am not sure if you are inquiring about the right plugin but WebinarPress does not have a “Database Migration” feature. Can you please clarify which functionality are you referring to?

    Plugin Support Ruel

    (@ruel214)

    @webtecky I have consulted our development team regarding your inquiry. I was told that you must be referring to the DB upgrade feature. They currently run in “init”. If this is what you are referring to, they can change it to “admin_init”. These changes will be part of our next version update.

    Thread Starter webtecky

    (@webtecky)

    Yes, correct, I am referring to line 56 of \wp-webinarsystem\includes\class-webinarsysteem.php, add_action(‘init’, [$this, ‘run_database_migrations’]);.

    If also the ‘run_database_migrations’ callback method could run only if not AJAX, it would be perfect.

    /*
         * Run migrations
         */
        public function run_database_migrations() {
            if( ! wp_doing_ajax() ){
                $db = new WebinarsysteemDbMigrations();
    
                $force_db_upgrade = isset($_GET['force-db-migrate']);
    
                if (is_user_logged_in() && current_user_can('administrator') && $force_db_upgrade) {
                    $db->force_migrations_with_debug();
                }
    
                $db->run_migrations();
            }
        }
    Plugin Support Ruel

    (@ruel214)

    I will relay that information to our technical team.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database Migration’ is closed to new replies.