Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Infusionsoft contact custom field example
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_infusionsoft_pass_payment_url( $is_contact_data, $ee_attendee ) {
if( $ee_attendee instanceof EE_Attendee ) {
$checkout = EE_Registry::instance()->SSN->checkout();
if ( $checkout instanceof EE_Checkout ) {
$transaction = $checkout->transaction;
if ( $transaction instanceof EE_Transaction ) {
$url = $transaction->payment_overview_url();
$is_contact_data[ '_yourISfieldforpaymentURL' ] = $url;
}
}
} else {
EE_Error::add_error(sprintf(
__(
'ee_infusionsoft_pass_payment_url was not called with an EE_Attendee but a %s',
'event_espresso'
), gettype( $ee_attendee )), __FILE__, __FUNCTION__, __LINE__ );
}
return $is_contact_data;
}
add_filter(
'FHEE__EED_Infusionsoft__save_infusionsoft_attendee__extra_attendee_data',
'ee_infusionsoft_pass_payment_url',
10,
2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.