_wp_privacy_send_request_confirmation_notification

The timeline below displays how wordpress function _wp_privacy_send_request_confirmation_notification has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * Notifies the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request($request_id);
    if (!$request instanceof WP_User_Request || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    if ('export_personal_data' === $request->action_name) {
        $manage_url = admin_url('export-personal-data.php');
    } elseif ('remove_personal_data' === $request->action_name) {
        $manage_url = admin_url('erase-personal-data.php');
    }
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $content = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * The email is sent to an administrator when a 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.
     *
     * @since 4.9.6
     * @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead.
     *                   For user erasure fulfillment email content
     *                   use {@see 'user_erasure_fulfillment_email_content'} instead.
     *
     * @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          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed
     *                                        so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters_deprecated('user_confirmed_action_email_content', array($content, $email_data), '5.8.0', sprintf(
        /* translators: 1 & 2: Deprecation replacement options. */
        __('%1$s or %2$s'),
        'user_request_confirmed_email_content',
        'user_erasure_fulfillment_email_content'
    ));
    /**
     * Filters the body of the user request confirmation email.
     *
     * The email is sent to an administrator when a 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.
     *
     * @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          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_request_confirmed_email_content', $content, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', sanitize_url($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', sanitize_url($email_data['siteurl']), $content);
    $headers = '';
    /**
     * Filters the headers of the user request confirmation email.
     *
     * @since 5.4.0
     *
     * @param string|array $headers    The email headers.
     * @param string       $subject    The email subject.
     * @param string       $content    The email content.
     * @param int          $request_id The request ID.
     * @param array        $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $headers = apply_filters('user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content, $headers);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 6.1

/**
 * Notifies the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    if ('export_personal_data' === $request->action_name) {
        $manage_url = admin_url('export-personal-data.php');
    } elseif ('remove_personal_data' === $request->action_name) {
        $manage_url = admin_url('erase-personal-data.php');
    }
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $content = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * The email is sent to an administrator when a 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.
     *
     * @since 4.9.6
     * @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead.
     *                   For user erasure fulfillment email content
     *                   use {@see 'user_erasure_fulfillment_email_content'} instead.
     *
     * @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          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed
     *                                        so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters_deprecated('user_confirmed_action_email_content', array($content, $email_data), '5.8.0', sprintf(
        /* translators: 1 & 2: Deprecation replacement options. */
        __('%1$s or %2$s'),
        'user_request_confirmed_email_content',
        'user_erasure_fulfillment_email_content'
    ));
    /**
     * Filters the body of the user request confirmation email.
     *
     * The email is sent to an administrator when a 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.
     *
     * @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          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_request_confirmed_email_content', $content, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', sanitize_url($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', sanitize_url($email_data['siteurl']), $content);
    $headers = '';
    /**
     * Filters the headers of the user request confirmation email.
     *
     * @since 5.4.0
     *
     * @param string|array $headers    The email headers.
     * @param string       $subject    The email subject.
     * @param string       $content    The email content.
     * @param int          $request_id The request ID.
     * @param array        $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $headers = apply_filters('user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content, $headers);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 5.8

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    if ('export_personal_data' === $request->action_name) {
        $manage_url = admin_url('export-personal-data.php');
    } elseif ('remove_personal_data' === $request->action_name) {
        $manage_url = admin_url('erase-personal-data.php');
    }
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $content = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * The email is sent to an administrator when a 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.
     *
     * @since 4.9.6
     * @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead.
     *                   For user erasure fulfillment email content
     *                   use {@see 'user_erasure_fulfillment_email_content'} instead.
     *
     * @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          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed
     *                                        so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters_deprecated('user_confirmed_action_email_content', array($content, $email_data), '5.8.0', sprintf(
        /* translators: 1 & 2: Deprecation replacement options. */
        __('%1$s or %2$s'),
        'user_request_confirmed_email_content',
        'user_erasure_fulfillment_email_content'
    ));
    /**
     * Filters the body of the user request confirmation email.
     *
     * The email is sent to an administrator when a 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.
     *
     * @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          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_request_confirmed_email_content', $content, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $headers = '';
    /**
     * Filters the headers of the user request confirmation email.
     *
     * @since 5.4.0
     *
     * @param string|array $headers    The email headers.
     * @param string       $subject    The email subject.
     * @param string       $content    The email content.
     * @param int          $request_id The request ID.
     * @param array        $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $headers = apply_filters('user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content, $headers);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 5.4

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    if ('export_personal_data' === $request->action_name) {
        $manage_url = admin_url('export-personal-data.php');
    } elseif ('remove_personal_data' === $request->action_name) {
        $manage_url = admin_url('erase-personal-data.php');
    }
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $headers = '';
    /**
     * Filters the headers of the user request confirmation email.
     *
     * @since 5.4.0
     *
     * @param string|array $headers    The email headers.
     * @param string       $subject    The email subject.
     * @param string       $content    The email content.
     * @param int          $request_id The request ID.
     * @param array        $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $headers = apply_filters('user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content, $headers);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 3.3

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request_data($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    if ('export_personal_data' === $request->action_name) {
        $manage_url = admin_url('export-personal-data.php');
    } elseif ('remove_personal_data' === $request->action_name) {
        $manage_url = admin_url('erase-personal-data.php');
    }
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 3.2

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request_data($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    $manage_url = add_query_arg('page', $request->action_name, admin_url('tools.php'));
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: .10

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request_data($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    if ('export_personal_data' === $request->action_name) {
        $manage_url = admin_url('export-personal-data.php');
    } elseif ('remove_personal_data' === $request->action_name) {
        $manage_url = admin_url('erase-personal-data.php');
    }
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 5.2

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request_data($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    $manage_url = add_query_arg('page', $request->action_name, admin_url('tools.php'));
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: Privacy data request confirmed notification email subject. 1: Site title, 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 5.1

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request = wp_get_user_request_data($request_id);
    if (!is_a($request, 'WP_User_Request') || 'request-confirmed' !== $request->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    $manage_url = add_query_arg('page', $request->action_name, admin_url('tools.php'));
    $action_description = wp_user_request_action_description($request->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email The email address of the notification recipient.
     * @param WP_User_Request $request     The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request);
    $email_data = array('request' => $request, 'user_email' => $request->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: 1: Site name. 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 9.8

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request_data = wp_get_user_request_data($request_id);
    if (!is_a($request_data, 'WP_User_Request') || 'request-confirmed' !== $request_data->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    $manage_url = add_query_arg('page', $request_data->action_name, admin_url('tools.php'));
    $action_description = wp_user_request_action_description($request_data->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email  The email address of the notification recipient.
     * @param WP_User_Request $request_data The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request_data);
    $email_data = array('request' => $request_data, 'user_email' => $request_data->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: 1: Site name. 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: 9.6

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request_data = wp_get_user_request_data($request_id);
    if (!is_a($request_data, 'WP_User_Request') || 'request-confirmed' !== $request_data->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    $subject = sprintf(
        /* translators: %s Site name. */
        __('[%s] Action Confirmed'),
        wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)
    );
    $manage_url = add_query_arg('page', $request_data->action_name, admin_url('tools.php'));
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email  The email address of the notification recipient.
     * @param WP_User_Request $request_data The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request_data);
    $email_data = array('request' => $request_data, 'user_email' => $request_data->email, 'description' => wp_user_request_action_description($request_data->action_name), 'manage_url' => $manage_url, 'sitename' => get_option('blogname'), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', wp_specialchars_decode($email_data['sitename'], ENT_QUOTES), $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}

WordPress Version: .10

/**
 * Notify the site administrator via email when a request is confirmed.
 *
 * Without this, the admin would have to manually check the site to see if any
 * action was needed on their part yet.
 *
 * @since 4.9.6
 *
 * @param int $request_id The ID of the request.
 */
function _wp_privacy_send_request_confirmation_notification($request_id)
{
    $request_data = wp_get_user_request_data($request_id);
    if (!is_a($request_data, 'WP_User_Request') || 'request-confirmed' !== $request_data->status) {
        return;
    }
    $already_notified = (bool) get_post_meta($request_id, '_wp_admin_notified', true);
    if ($already_notified) {
        return;
    }
    $manage_url = add_query_arg('page', $request_data->action_name, admin_url('tools.php'));
    $action_description = wp_user_request_action_description($request_data->action_name);
    /**
     * Filters the recipient of the data request confirmation notification.
     *
     * In a Multisite environment, this will default to the email address of the
     * network admin because, by default, single site admins do not have the
     * capabilities required to process requests. Some networks may wish to
     * delegate those capabilities to a single-site admin, or a dedicated person
     * responsible for managing privacy requests.
     *
     * @since 4.9.6
     *
     * @param string          $admin_email  The email address of the notification recipient.
     * @param WP_User_Request $request_data The request that is initiating the notification.
     */
    $admin_email = apply_filters('user_request_confirmed_email_to', get_site_option('admin_email'), $request_data);
    $email_data = array('request' => $request_data, 'user_email' => $request_data->email, 'description' => $action_description, 'manage_url' => $manage_url, 'sitename' => wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), 'siteurl' => home_url(), 'admin_email' => $admin_email);
    /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    $email_text = __('Howdy,

A user data privacy request has been confirmed on ###SITENAME###:

User: ###USER_EMAIL###
Request: ###DESCRIPTION###

You can view and manage these data privacy requests here:

###MANAGE_URL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the body of the user request confirmation email.
     *
     * 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.
     *
     * @since 4.9.6
     *
     * @param string $email_text Text in the email.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $content = apply_filters('user_confirmed_action_email_content', $email_text, $email_data);
    $content = str_replace('###SITENAME###', $email_data['sitename'], $content);
    $content = str_replace('###USER_EMAIL###', $email_data['user_email'], $content);
    $content = str_replace('###DESCRIPTION###', $email_data['description'], $content);
    $content = str_replace('###MANAGE_URL###', esc_url_raw($email_data['manage_url']), $content);
    $content = str_replace('###SITEURL###', esc_url_raw($email_data['siteurl']), $content);
    $subject = sprintf(
        /* translators: 1: Site name. 2: Name of the confirmed action. */
        __('[%1$s] Action Confirmed: %2$s'),
        $email_data['sitename'],
        $action_description
    );
    /**
     * Filters the subject of the user request confirmation email.
     *
     * @since 4.9.8
     *
     * @param string $subject    The email subject.
     * @param string $sitename   The name of the site.
     * @param array  $email_data {
     *     Data relating to the account action email.
     *
     *     @type WP_User_Request $request     User request object.
     *     @type string          $user_email  The email address confirming a request
     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     *     @type string          $manage_url  The link to click manage privacy requests of this type.
     *     @type string          $sitename    The site name sending the mail.
     *     @type string          $siteurl     The site URL sending the mail.
     *     @type string          $admin_email The administrator email receiving the mail.
     * }
     */
    $subject = apply_filters('user_request_confirmed_email_subject', $subject, $email_data['sitename'], $email_data);
    $email_sent = wp_mail($email_data['admin_email'], $subject, $content);
    if ($email_sent) {
        update_post_meta($request_id, '_wp_admin_notified', true);
    }
}