diff --git a/src/wp-admin/includes/privacy-tools.php b/src/wp-admin/includes/privacy-tools.php
index 8b78752a85..8e283f930b 100644
a
|
b
|
function _wp_personal_data_handle_actions() { |
166 | 166 | } |
167 | 167 | |
168 | 168 | if ( 'pending' === $status ) { |
169 | | wp_send_user_request( $request_id ); |
170 | | |
171 | | $message = __( 'Confirmation request initiated successfully.' ); |
| 169 | $user_request = wp_send_user_request( $request_id ); |
| 170 | if ( is_wp_error( $user_request ) ) { |
| 171 | add_settings_error( |
| 172 | 'username_or_email_for_privacy_request', |
| 173 | 'username_or_email_for_privacy_request', |
| 174 | $user_request->get_error_message(), |
| 175 | 'error' |
| 176 | ); |
| 177 | } else { |
| 178 | $message = __( 'Confirmation request initiated successfully.' ); |
| 179 | } |
172 | 180 | } elseif ( 'confirmed' === $status ) { |
173 | 181 | $message = __( 'Request added successfully.' ); |
174 | 182 | } |