Skip to content

Commit

Permalink
Fix issue with site creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauteri committed Jun 9, 2024
1 parent a5f2e02 commit 9542a00
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions includes/core/classes/class-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

use Exception;
use GatherPress\Core\Traits\Singleton;
use WP_Site;

/**
* Class Setup.
Expand Down Expand Up @@ -333,12 +334,13 @@ public function add_online_event_term(): void {
*
* @since 1.0.0
*
* @param int $site_id ID of the newly created site.
* @param WP_Site $new_site the newly created site.
*
* @return void
*/
public function on_site_create( int $site_id ): void {
public function on_site_create( WP_Site $new_site ): void {
if ( is_plugin_active_for_network( 'gatherpress/gatherpress.php' ) ) {
switch_to_blog( $site_id );
switch_to_blog( $new_site->blog_id );
$this->create_tables();
restore_current_blog();
}
Expand Down

0 comments on commit 9542a00

Please sign in to comment.