Created
November 28, 2020 00:16
-
-
Save dryan1144/90eb78adff0766580d91d1563d3145f1 to your computer and use it in GitHub Desktop.
Subscribe user to Convertkit tag after EDD purchase
This file contains 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( 'edd_complete_purchase', 'draw_update_ck_with_customer_tag' ); | |
function draw_update_ck_with_customer_tag( $payment_id ) { | |
$ck_customer_tag_id = 1234; | |
$edd_payment = new EDD_Payment($payment_id); | |
$email = $edd_payment->email; | |
drw_update_ck_subscriber( $email, $ck_customer_tag_id, 'subscribe' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment