Add wp user privacy-request commands for GDPR personal data management#611
Open
Add wp user privacy-request commands for GDPR personal data management#611
wp user privacy-request commands for GDPR personal data management#611Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/945cce56-1ac8-48a6-adc2-32f7ea452224 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
…in export and erase commands Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/945cce56-1ac8-48a6-adc2-32f7ea452224 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add commands for erasing and exporting personal data
Add Apr 22, 2026
wp user privacy-request commands for GDPR personal data management
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
swissspidy
reviewed
Apr 22, 2026
Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/b837075e-3a1d-486d-8781-8d174feb9cfa Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/23bdadcf-1412-48b9-a8b9-e2c3a8c6adb7 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…xport_file_name) Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/76bb4546-13cf-4c5e-90d1-e8679fd9b477 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
swissspidy
reviewed
May 4, 2026
…se tests Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/65e42f81-5f43-4d75-918d-cf18b5cb3669 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/wp-cli/entity-command/sessions/65e42f81-5f43-4d75-918d-cf18b5cb3669 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WordPress 4.9.6 introduced personal data export and erasure tools (GDPR), but no WP-CLI interface existed for them. This adds a
wp user privacy-requestcommand group covering the full lifecycle ofuser_requestposts.New commands
list— Query all requests; filterable by--action-typeand--status, supports all standard output formats (table,csv,json,ids,count,yaml)create <email> <action-type>— Create aexport_personal_dataorremove_personal_datarequest;--status=pending|confirmed,--send-email,--porcelaindelete <request-id>...— Delete one or more requests; batch-reports success/failure countserase <request-id>— Invoke all registeredwp_privacy_personal_data_erasersfor the request's email, then mark itrequest-completedexport <request-id>— Invoke all registeredwp_privacy_personal_data_exporters, generate the ZIP viawp_privacy_generate_personal_data_export_file(), mark complete, and output the file pathcomplete <request-id>...— Mark one or more requests asrequest-completed; batch-reports success/failure countsImplementation notes
eraseandexportiterate over all registered erasers/exporters page-by-page (matching the admin AJAX flow) before marking the request completeexporterrors explicitly ifwp_privacy_generate_personal_data_export_file()produces no file pathwp_delete_user_request()exists since WP 4.9.6 but is absent from thephp-stubs/wordpress-stubslibrary; suppressed with a scoped@phpstan-ignorephpcs.xml.distupdated to includeUser_Privacy_Request_Commandin the existing NamingConventions class-prefix exclusion pattern (consistent with all other command classes)