• Hi,
    I’m using your beautiful plugin, but I found that this plugin does not work well in multisite environment.
    It seems that the main site is OK, but in sub sites, tables wp_n_terms_hit are not created when I activate this plugin using “Network Activate” in Network Admin.

    Could you check with the code below?

    class.database.php: line 28

    // not tested
    if (is_multisite()) {
        $sites = get_sites();
        foreach($sites as $site) {
            switch_to_blog( $site['blog_id'] );
            $is_table = self::is_table_exists();
            if ( empty( $is_table ) ) {
                self::create_table();
            }
            restore_current_blog();
        }
    } else {
        $is_table = self::is_table_exists();
        if ( empty( $is_table ) ) {
            self::create_table();
        }
    }
    

    Thanks.

  • The topic ‘DB table is not created correctly in multisite environment’ is closed to new replies.