bp_email_update_welcome_email( string $welcome_email, int $blog_id, int $user_id, string $password, string $title, array $meta )

Filters the content of the welcome email after site activation.

Description

Content should be formatted for transmission via wp_mail().

Parameters

$welcome_email

(Required) Message body of the email.

$blog_id

(Required) Blog ID.

$user_id

(Required) User ID.

$password

(Required) User password.

$title

(Required) Site title.

$meta

(Required) Signup meta data. By default, contains the requested privacy setting and lang_id.

Source

File: bp-core/bp-core-wp-emails.php

	function bp_email_update_welcome_email( $welcome_email, $blog_id, $user_id, $password, $title, $meta ) {

		if ( $welcome_email == false ) {
			/* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
			$welcome_email = '<p>' . __( 'Howdy USERNAME,', 'buddyboss' ) . '</p>';
			$welcome_email .= '<p>' . __( 'Your new SITE_NAME site has been successfully set up at: <br />BLOG_URL', 'buddyboss' ) . '</p>';
			$welcome_email .= '<p>' . __( 'You can log in to the administrator account with the following information:', 'buddyboss' ) . '</p>';
			$welcome_email .= '<p>' . __( 'Username: USERNAME', 'buddyboss' ) . '</p>';
			$welcome_email .= '<p>' . __( 'Password: PASSWORD', 'buddyboss' ) . '</p>';
			$welcome_email .= '<p>' . __( 'Log in here: BLOG_URLwp-login.php', 'buddyboss' ) . '</p>';
			$welcome_email .= '<p>' . __( 'We hope you enjoy your new site. Thanks! <br />--The Team @ SITE_NAME', 'buddyboss' ) . '</p>';
		}

		add_filter( 'wp_mail_content_type', 'bp_email_set_content_type' ); //add this to support html in email

		$welcome_email = bp_email_core_wp_get_template( $welcome_email, get_userdata( $user_id ) );

		return $welcome_email;
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.