PersonalDataProviderInterface
in
Contract a host/product package implements to plug domain data into the WordPress personal-data export and erasure flows.
The adapter knows nothing about the domain: it registers the WordPress filters and, when WordPress dispatches a request for a given email address, delegates to the registered providers. Product packages supply the actual personal data WITHOUT importing any proprietary namespace — they depend only on this OSS contract.
Implementations are paginated: WordPress invokes the exporter/eraser
repeatedly with an increasing 1-based page number until the returned
done flag is true.
Table of Contents
Methods
-
erase()
: array{items_removed: bool, items_retained: bool, messages: array
, done: bool} - Erase (or anonymise) the personal data this provider holds for the email.
-
export()
: array{data: array
>, done: bool} - Export the personal data this provider holds for the given email.
- key() : string
- Stable, unique identifier used as the WordPress exporter/eraser key (e.g. `my-plugin-orders`). Must be slug-like and constant across runs.
- label() : string
- Human-readable label shown in the WordPress privacy tooling (the exporter/eraser "friendly name").
Methods
erase()
Erase (or anonymise) the personal data this provider holds for the email.
public
erase(string $email, int $page) : array{items_removed: bool, items_retained: bool, messages: array, done: bool}
Return the WordPress eraser result shape:
['items_removed' => bool, 'items_retained' => bool, 'messages' => array<int, string>, 'done' => bool].
Parameters
- $email : string
-
the email address being erased
- $page : int
-
1-based pagination cursor
Return values
array{items_removed: bool, items_retained: bool, messages: arrayexport()
Export the personal data this provider holds for the given email.
public
export(string $email, int $page) : array{data: array>, done: bool}
Return the WordPress exporter result shape:
['data' => array<int, array{group_id: string, group_label: string, item_id: string, data: array<int, array{name: string, value: mixed}>}>, 'done' => bool].
Parameters
- $email : string
-
the email address being exported
- $page : int
-
1-based pagination cursor
Return values
array{data: arraykey()
Stable, unique identifier used as the WordPress exporter/eraser key (e.g. `my-plugin-orders`). Must be slug-like and constant across runs.
public
key() : string
Return values
stringlabel()
Human-readable label shown in the WordPress privacy tooling (the exporter/eraser "friendly name").
public
label() : string