On a multisite environment, get the subdomain value as variable
wp_insert_site recieves WP_Site object, which contains details about the current site. https://developer.wordpress.org/reference/hooks/wp_insert_site/ do_action( ‘wp_insert_site’, WP_Site $new_site ) Fires once a site has been inserted into the database. https://developer.wordpress.org/reference/classes/wp_site/ WP_Site Object ( [blog_id] => 2 [domain] => localhost [path] => /m2/sagres/ [site_id] => 1 [registered] => 2018-03-23 13:49:37 [last_updated] => 2019-03-05 15:52:10 [public] => 0 [archived] … Read more