mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Privacy: Mark processed requests as completed instead of confirmed.
r43008 refactored the request flow to make several improvements, but accidentally marked `completed` requests as `confirmed`. This commit restores the intended statuses, so that the data and corresponding UI reflect reality. Props allendav, birgire. Fixes #43913. git-svn-id: https://develop.svn.wordpress.org/trunk@43183 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -609,13 +609,13 @@ function _wp_privacy_resend_request( $request_id ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a request as completed by the admin and logs the datetime.
|
||||
* Marks a request as completed by the admin and logs the current timestamp.
|
||||
*
|
||||
* @since 4.9.6
|
||||
* @access private
|
||||
*
|
||||
* @param int $request_id Request ID.
|
||||
* @return int|WP_Error Request ID on succes or WP_Error.
|
||||
* @param int $request_id Request ID.
|
||||
* @return int|WP_Error $request Request ID on success or WP_Error.
|
||||
*/
|
||||
function _wp_privacy_completed_request( $request_id ) {
|
||||
$request_id = absint( $request_id );
|
||||
@@ -625,11 +625,11 @@ function _wp_privacy_completed_request( $request_id ) {
|
||||
return new WP_Error( 'privacy_request_error', __( 'Invalid request.' ) );
|
||||
}
|
||||
|
||||
update_post_meta( $request_id, '_wp_user_request_confirmed_timestamp', time() );
|
||||
update_post_meta( $request_id, '_wp_user_request_completed_timestamp', time() );
|
||||
|
||||
$request = wp_update_post( array(
|
||||
'ID' => $request_id,
|
||||
'post_status' => 'request-confirmed',
|
||||
'post_status' => 'request-completed',
|
||||
) );
|
||||
|
||||
return $request;
|
||||
|
||||
Reference in New Issue
Block a user