Fires when a contact requests a download of their personal data from the preferences page. Use this to include your extension’s data in the GDPR data export.
do_action( 'groundhogg/preferences/download_profile', $contact );
You will receive the Contact object.
Example
add_action( 'groundhogg/preferences/download_profile', 'my_extension_add_export_data' );
/**
* Include extension data in the contact's GDPR data download.
*
* @param \Groundhogg\Contact $contact
*
* @return void
*/
function my_extension_add_export_data( $contact ) {
$data = my_extension_get_contact_data( $contact->get_id() );
if ( empty( $data ) ) {
return;
}
echo 'My Extension Data';
foreach ( $data as $key => $value ) {
echo '';
}
echo '' . esc_html( $key ) . '' . esc_html( $value ) . '';
}
Was this helpful?
Let us know if this document answered your question. Thatβs the only way we can improve.
