Skip to content

Instantly share code, notes, and snippets.

@ScottDeLuzio
Created November 15, 2017 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ScottDeLuzio/8a8ea21139db29ab72721aba3d947729 to your computer and use it in GitHub Desktop.
Save ScottDeLuzio/8a8ea21139db29ab72721aba3d947729 to your computer and use it in GitHub Desktop.
add_filter( 'wpcrm_system_zapier_contact_data_filter', 'get_contacts_company_url' );
function get_contacts_company_url( $data, $post_id ){
// get the organization's ID number
$org_id = get_post_meta( $post_id, '_wpcrm_contact-attach-to-organization', true );
// retrieve the organization's website URL and add to the $data array
$data['orgurl'] = get_post_meta( $org_id, '_wpcrm_organization-website', true );
// return $data
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment