Skip to content

Instantly share code, notes, and snippets.

@dryan1144
Created November 28, 2020 00:16
Show Gist options
  • Save dryan1144/90eb78adff0766580d91d1563d3145f1 to your computer and use it in GitHub Desktop.
Save dryan1144/90eb78adff0766580d91d1563d3145f1 to your computer and use it in GitHub Desktop.
Subscribe user to Convertkit tag after EDD purchase
<?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