Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions includes/reader-activation/sync/class-metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ class Metadata {
*/
public static $keys = [];

/**
* Initialize hooks.
*/
public static function init_hooks() {
// Normalize contact data on upsert calls directly from Newsletters plugin (e.g. Subscription Form block).
add_filter( 'newspack_newsletters_contact_data', [ __CLASS__, 'normalize_contact_data' ] );
}

/**
* Get the metadata keys map for Reader Activation.
*
Expand Down Expand Up @@ -394,3 +402,4 @@ public static function normalize_contact_data( $contact ) {
return apply_filters( 'newspack_esp_sync_normalize_contact', $contact );
}
}
Metadata::init_hooks();