Last active
May 29, 2024 15:32
-
-
Save greenhornet79/c7aaa1600d7d7c55003de3575ea189d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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