Skip to content

Commit

Permalink
Helps dealing with privacy exports as in #16
Browse files Browse the repository at this point in the history
  • Loading branch information
avillegasn committed Apr 16, 2019
1 parent ab2ab0f commit 41a3dc6
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions camptix-invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,45 +680,3 @@ function get_invoice_posts( $email_address, $page ) {
)
);
}

/**
* Registers the personal data eraser for invoices.
*
* @param array $erasers
*
* @return array
*/
function ctx_register_invoice_data_erasers( $erasers ) {
$erasers['camptix-invoice'] = array(
'eraser_friendly_name' => __( 'CampTix Invoice Data', 'camptix' ),
'callback' => 'ctx_invoice_data_eraser',
);

return $erasers;
}
add_filter( 'wp_privacy_personal_data_erasers', 'ctx_register_invoice_data_eraser' );

/**
* Finds and erases personal data associated with an email address from the invoices list.
*
* @param string $email_address
* @param int $page
*
* @return array
*/
function ctx_invoice_data_eraser( $email_address, $page ) {

$page = (int) $page;
$items_removed = false;
$items_retained = false;
$messages = array();

//TODO complete this part.

return array(
'items_removed' => $items_removed,
'items_retained' => $items_retained,
'messages' => $messages,
'done' => $done,
);
}

0 comments on commit 41a3dc6

Please sign in to comment.