GDPR & Privacy
OM_GDPR provides the tools to operate OMailer in compliance with GDPR, CASL, and similar privacy laws.
Consent Logging
Every subscribe action logs consent details to om_consent_log:
| Column | Description |
|---|---|
subscriber_id | Who gave consent |
action | subscribe, unsubscribe, resubscribe, consent_update, export_request, erasure_request |
ip_address | Requester IP |
user_agent | Browser user agent |
consent_text | Exact text of the consent notice shown at signup |
source | Form, API, import, etc. |
created_at | Timestamp |
Subscriber columns added: consent_timestamp, consent_ip, consent_source, consent_text
PHP API
php// Log a consent action
OM_GDPR::log( $subscriber_id, 'subscribe', [
'ip_address' => '1.2.3.4',
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
'consent_text' => 'I agree to receive marketing emails',
'source' => 'checkout',
]);
// Record explicit consent (also updates subscriber record)
OM_GDPR::record_consent( $subscriber_id, 'I agree to receive marketing emails', 'form' );
// Get full consent history for a subscriber
$log = OM_GDPR::get_consent_log( $subscriber_id );
WordPress Privacy API Integration
OMailer registers itself with WordPress's built-in privacy tools:
- Personal Data Export (
wp_privacy_personal_data_exporters) — exports subscriber record, consent log, campaign history, custom fields - Personal Data Erasure (
wp_privacy_personal_data_erasers) — anonymises subscriber (email replaced with hash, personal fields cleared, consent log retained for legal records)
Both are accessible from Tools → Export Personal Data and Tools → Erase Personal Data in WP admin.
