Opened 7 years ago
Last modified 6 years ago
#44498 new enhancement
Make `_wp_personal_data_cleanup_requests()` run on cron
Reported by: | desrosj | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | needs-patch |
Focuses: | Cc: |
Description
When a data export or removal request is created, a user must confirm that request within x days. By default, this is 1 day (24 hours), but it can be changed using the user_request_key_expiration
filter. If a user does not confirm the request within that time, it is marked as failed, and the request needs to be re-initiated.
Currently, requests are only marked as failed when the Export/Erase Personal Data screens are accessed. By default, only administrators can access this page, and will most likely do so very infrequently. Because of this, a cron may be more appropriate for marking requests as failed.
A posts_per_page => -1
query arg is also used to fetch expired requests, which could cause issues when a large number of requests have failed. Moving this action to a cron should cut down on the number of requests that need to be transitioned at a time.
Great!