WC_Install::update PHP Method

update() private static method

Push all needed DB updates to the queue for processing.
private static update ( )
    private static function update()
    {
        $current_db_version = get_option('woocommerce_db_version');
        $logger = wc_get_logger();
        $update_queued = false;
        foreach (self::$db_updates as $version => $update_callbacks) {
            if (version_compare($current_db_version, $version, '<')) {
                foreach ($update_callbacks as $update_callback) {
                    $logger->add('wc_db_updates', sprintf('Queuing %s - %s', $version, $update_callback));
                    self::$background_updater->push_to_queue($update_callback);
                    $update_queued = true;
                }
            }
        }
        if ($update_queued) {
            self::$background_updater->save()->dispatch();
        }
    }