bp_email_wp_privacy_personal_data_email_content( string $email_text, int $request_id )

Filters the text of the email sent with a personal data export file.

Description

The following strings have a special meaning and will get replaced dynamically:

EXPIRATION### The date when the URL will be automatically deleted.

LINK### URL of the personal data export file for the user.

SITENAME### The name of the site.

SITEURL### The URL to the site.

Parameters

$email_text

(Required) Text in the email.

$request_id

(Required) The request ID for this personal data export.

Source

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

	function bp_email_wp_privacy_personal_data_email_content( $email_text, $request_id ) {
		// Get the request data.
		$request = wp_get_user_request_data( $request_id );

		$email_text = '<p>' . __( 'Howdy,', 'buddyboss' ) . '</p>';
		$email_text .= '<p>' . __( 'Your request for an export of personal data has been completed. You may download your personal data by clicking on the link below. For privacy and security, we will automatically delete the file on ###EXPIRATION###, so please download it before then.', 'buddyboss' ) . '</p>';
		$email_text .= '<p><a href="###LINK###">' . __( '###LINK###', 'buddyboss' ) . '</a></p>';
		$email_text .= '<p>' . __( 'Regards, <br /> All at <a href="###SITEURL###">###SITENAME###</a> <br /> <a href="###SITEURL###">###SITEURL###</a>', 'buddyboss' ) . '</p>';

		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', $request->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.