Created
October 23, 2024 21:45
-
-
Save greenhornet79/a76e25bffd4f16ef3f5ea8082801bee4 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_action('leaky_paywall_active_campaign_after_new_subscriber', 'zeen_add_custom_field_for_active_campaign', 10, 2 ); | |
function zeen_add_custom_field_for_active_campaign( $user_id, $contact_id ) { | |
$field_id = 1; // retrieved from the admin settings custom fields table | |
$value = sanitize_text_field( $_POST['2_field_8_1'] ); // custom registration field name | |
$api = new Leaky_Paywall_Active_Campaign_Api(); | |
$api->add_custom_field($contact_id, $field_id, $value); | |
// add additional custom fields here using the same process | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment