Filter
rpress_privacy_customer_record
On this page
Filters the customer record group in a personal data export.
Runs in rpress_privacy_customer_record_exporter() after the 'Customer Record' group has been assembled (customer ID, primary email, name, creation date, all emails and any recorded terms or privacy agreement times). The group is an array with 'group_id', 'group_label', 'item_id' and a 'data' list of name and value pairs.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$export_data | array | The export group with 'group_id', 'group_label', 'item_id' and 'data'. |
$customer | RPRESS_Customer | The customer being exported. |
Return value#
array. The export group.
Example#
add_filter( 'rpress_privacy_customer_record', 'my_export_customer_phone', 10, 2 );
function my_export_customer_phone( $export_data, $customer ) {
$phone = $customer->get_meta( 'my_phone' );
if ( $phone ) {
$export_data['data'][] = array(
'name' => __( 'Phone', 'my-plugin' ),
'value' => $phone,
);
}
return $export_data;
}
Source#
Applied in:
includes/privacy-functions.php(line 545), inrpress_privacy_customer_record_exporter()
See also#
Was this page helpful?
