Commit f04cb62
committed
Privacy: Clean up expired personal data requests via cron.
Introduce `wp_schedule_personal_data_cleanup_requests()` to schedule a daily cron event which marks expired `request-pending` personal data requests as `request-failed`. Previously this cleanup only ran when an administrator visited the Export or Erase Personal Data screens.
Also fix `_wp_personal_data_cleanup_requests()` to query the local-time `post_modified` column instead of `post_modified_gmt`, since `WP_Date_Query` resolves relative date strings like "24 hours ago" in the site's timezone; comparing the GMT column against that local threshold shifted the expiry window by the site's UTC offset.
Developed in WordPress#12049.
Follow-up to r43011.
Props masteradhoc, nimeshatxecurify, desrosj, mukesh27, audrasjb, khokansardar, westonruter.
See #44500.
Fixes #44498.
git-svn-id: https://develop.svn.wordpress.org/trunk@62662 602fd350-edb4-49c9-b593-d223f7449a821 parent 89b5d32 commit f04cb62
4 files changed
Lines changed: 528 additions & 1 deletion
File tree
- src
- wp-admin/includes
- wp-includes
- tests/phpunit/tests/privacy
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
208 | 214 | | |
209 | 215 | | |
210 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
467 | 469 | | |
468 | 470 | | |
469 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8507 | 8507 | | |
8508 | 8508 | | |
8509 | 8509 | | |
| 8510 | + | |
| 8511 | + | |
| 8512 | + | |
| 8513 | + | |
| 8514 | + | |
| 8515 | + | |
| 8516 | + | |
| 8517 | + | |
| 8518 | + | |
| 8519 | + | |
| 8520 | + | |
| 8521 | + | |
| 8522 | + | |
| 8523 | + | |
| 8524 | + | |
| 8525 | + | |
| 8526 | + | |
| 8527 | + | |
| 8528 | + | |
| 8529 | + | |
| 8530 | + | |
| 8531 | + | |
| 8532 | + | |
| 8533 | + | |
| 8534 | + | |
| 8535 | + | |
| 8536 | + | |
| 8537 | + | |
| 8538 | + | |
| 8539 | + | |
| 8540 | + | |
| 8541 | + | |
8510 | 8542 | | |
8511 | 8543 | | |
8512 | 8544 | | |
| |||
0 commit comments