Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save greenhornet79/c7aaa1600d7d7c55003de3575ea189d5 to your computer and use it in GitHub Desktop.
Save greenhornet79/c7aaa1600d7d7c55003de3575ea189d5 to your computer and use it in GitHub Desktop.
<?php
add_filter('leaky_paywall_hubspot_create_contact_data', 'zeen_add_more_data_to_hubspot', 10, 2);
function zeen_add_more_data_to_hubspot( $data, $subscriber_data ) {
// get the subscriber's level id
$level_id = absint($subscriber_data['level_id']);
// Append the level id to the level_id custom property
// Notice that the level_id array key is the Hubspot internal name of the property.
$data['properties']['level_id'] = $level_id;
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment