bp_email_wp_user_confirmed_action_email_content( string $email_text, array $email_data )

Filters the body of the user request confirmation email.

Description

The email is sent to an administrator when an user request is confirmed. The following strings have a special meaning and will get replaced dynamically:

SITENAME### The name of the site.

USER_EMAIL### The user email for the request.

DESCRIPTION### Description of the action being performed so the user knows what the email is for.

MANAGE_URL### The URL to manage requests.

SITEURL### The URL to the site.

Parameters

$email_text

(Required) Text in the email.

$email_data

(Required) Data relating to the account action email.

  • 'request'
    (WP_User_Request) User request object.
  • 'user_email'
    (string) The email address confirming a request
  • 'description'
    (string) Description of the action being performed so the user knows what the email is for.
  • 'manage_url'
    (string) The link to click manage privacy requests of this type.
  • 'sitename'
    (string) The site name sending the mail.
  • 'siteurl'
    (string) The site URL sending the mail.
  • 'admin_email'
    (string) The administrator email receiving the mail.

Source

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

	function bp_email_wp_user_confirmed_action_email_content( $email_text, $email_data ) {

		if ( ! empty( $email_data['admin_email'] ) ) {

			$email = $email_data['admin_email'];

			/* translators: Do not translate SITENAME, SITEURL; those are placeholders. */
			$email_text = '<p>' . __( 'Howdy,', 'buddyboss' ) . '</p>';
			$email_text .= '<p>' . __( 'A user data privacy request has been confirmed on ###SITENAME###:', 'buddyboss' ) . '</p>';
			$email_text .= '<p>' . __( 'User: ###USER_EMAIL###', 'buddyboss' ) . '</p>';
			$email_text .= '<p>' . __( 'Request: ###DESCRIPTION###', 'buddyboss' ) . '</p>';
			$email_text .= '<p>' . __( 'You can view and manage these data privacy requests here:', 'buddyboss' ) . '</p>';
			$email_text .= '<p><a href="###MANAGE_URL###">' . __( '###MANAGE_URL###', 'buddyboss' ) . '</a></p>';
			$email_text .= '<p>' . __( 'Regards, <br />All at <a href="###SITEURL###">###SITENAME###</a> <br /><a href="###SITEURL###">###SITEURL###</a>', 'buddyboss' ) . '</p>';

		} else {
			if ( empty( $email_data['privacy_policy_url'] ) ) {
				/* translators: Do not translate SITENAME, SITEURL; those are placeholders. */
				$email_text = '<p>' . __( 'Howdy,', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'Your request to erase your personal data on ###SITENAME### has been completed.', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'If you have any follow-up questions or concerns, please contact the site administrator.', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'Regards, <br />All at <a href="###SITEURL###">###SITENAME###</a> <br /><a href="###SITEURL###">###SITEURL###</a>', 'buddyboss' ) . '</p>';
			} else {
				/* translators: Do not translate SITENAME, SITEURL, PRIVACY_POLICY_URL; those are placeholders. */
				$email_text = '<p>' . __( 'Howdy,', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'Your request to erase your personal data on ###SITENAME### has been completed.', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'If you have any follow-up questions or concerns, please contact the site administrator.', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'For more information, you can also read our privacy policy: ###PRIVACY_POLICY_URL###', 'buddyboss' ) . '</p>';
				$email_text .= '<p>' . __( 'Regards, <br />All at <a href="###SITEURL###">###SITENAME###</a> <br /><a href="###SITEURL###">###SITEURL###</a>', 'buddyboss' ) . '</p>';
			}

			$email = $email_data['user_email'];
		}

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

		$email_text = bp_email_core_wp_get_template( $email_text, get_user_by( 'email', $email ) );

		return $email_text;
	}

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.