Filter hook 'user_erasure_fulfillment_email_content'

in WP Core File wp-includes/user.php at line 4575

View Source

user_erasure_fulfillment_email_content

Filter Hook
Description
Filters the body of the data erasure fulfillment notification. The email is sent to a user when their data erasure request is fulfilled by an administrator. The following strings have a special meaning and will get replaced dynamically: ###SITENAME### The name of the site. ###PRIVACY_POLICY_URL### Privacy policy page URL. ###SITEURL### The URL to the site. to the value of `$request->email`, but can be changed by the `user_erasure_fulfillment_email_to` filter. }

Hook Information

File Location wp-includes/user.php View on GitHub
Hook Type Filter
Line Number 4575

Hook Parameters

Type Name Description
string $content The email content.
array $email_data { Data relating to the account action email.

Usage Examples

Basic Usage
<?php
// Hook into user_erasure_fulfillment_email_content
add_filter('user_erasure_fulfillment_email_content', 'my_custom_filter', 10, 2);

function my_custom_filter($content, $email_data) {
    // Your custom filtering logic here
    return $content;
}

Source Code Context

wp-includes/user.php:4575 - How this hook is used in WordPress core
<?php
4570  	 *     @type string          $privacy_policy_url Privacy policy URL.
4571  	 *     @type string          $sitename           The site name sending the mail.
4572  	 *     @type string          $siteurl            The site URL sending the mail.
4573  	 * }
4574  	 */
4575  	$content = apply_filters( 'user_erasure_fulfillment_email_content', $content, $email_data );
4576  
4577  	$content = str_replace( '###SITENAME###', $email_data['sitename'], $content );
4578  	$content = str_replace( '###PRIVACY_POLICY_URL###', $email_data['privacy_policy_url'], $content );
4579  	$content = str_replace( '###SITEURL###', sanitize_url( $email_data['siteurl'] ), $content );
4580  

PHP Documentation

<?php
/**
	 * Filters the body of the data erasure fulfillment notification.
	 *
	 * The email is sent to a user when their data erasure request is fulfilled
	 * by an administrator.
	 *
	 * The following strings have a special meaning and will get replaced dynamically:
	 *
	 * ###SITENAME###           The name of the site.
	 * ###PRIVACY_POLICY_URL### Privacy policy page URL.
	 * ###SITEURL###            The URL to the site.
	 *
	 * @since 5.8.0
	 *
	 * @param string $content The email content.
	 * @param array  $email_data {
	 *     Data relating to the account action email.
	 *
	 *     @type WP_User_Request $request            User request object.
	 *     @type string          $message_recipient  The address that the email will be sent to. Defaults
	 *                                               to the value of `$request->email`, but can be changed
	 *                                               by the `user_erasure_fulfillment_email_to` filter.
	 *     @type string          $privacy_policy_url Privacy policy URL.
	 *     @type string          $sitename           The site name sending the mail.
	 *     @type string          $siteurl            The site URL sending the mail.
	 * }
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.