wphooks.info - rest_delete_user

rest_delete_user

The hook occurs in the following file:

wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php:
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
		/**
		 * Fires immediately after a user is deleted via the REST API.
		 *
		 * @since 4.7.0
		 *
		 * @param WP_User          $user     The user data.
		 * @param WP_REST_Response $response The response returned from the API.
		 * @param WP_REST_Request  $request  The request sent to the API.
		 */
		do_action( 'rest_delete_user', $user, $response, $request );

		return $response;
	}

	/**
	 * Checks if a given request has access to delete the current user.
	 *
	 * @since 4.7.0
	 * @access public