diff --git a/includes/core/classes/class-setup.php b/includes/core/classes/class-setup.php index f43dff8d4..d5d878a13 100644 --- a/includes/core/classes/class-setup.php +++ b/includes/core/classes/class-setup.php @@ -16,6 +16,7 @@ use Exception; use GatherPress\Core\Traits\Singleton; +use WP_Site; /** * Class Setup. @@ -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(); }