[Documentation](https://groundhogg.io/documentation/) » [Action Hooks](https://groundhogg.io/documentation/#doc-action-hooks)

# groundhogg/preferences/erase_profile

Published Wednesday, June 10, 2026 · Last updated Wednesday, June 10, 2026

Fires when a contact requests erasure of their personal data from the preferences page. Use this to delete your extension’s data for that contact.

```

do_action( 'groundhogg/preferences/erase_profile', $contact );
```

You will receive the `Contact` object.

## Example

```

add_action( 'groundhogg/preferences/erase_profile', 'my_extension_erase_data' );

/**
 * Delete all extension data when a contact requests erasure.
 *
 * @param \Groundhogg\Contact $contact
 *
 * @return void
 */
function my_extension_erase_data( $contact ) {
    global $wpdb;

    $wpdb->delete(
        $wpdb->prefix . 'my_extension_data',
        [ 'contact_id' => $contact->get_id() ],
        [ '%d' ]
    );
}
```
