Skip to content

Instantly share code, notes, and snippets.

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 kimcoleman/8173bf77a42699432097e864546fde59 to your computer and use it in GitHub Desktop.
Save kimcoleman/8173bf77a42699432097e864546fde59 to your computer and use it in GitHub Desktop.
Sync user fields with GetResponse with PMPro GetResponse
<?php
/**
* This filter will send additional user meta fields to contacts in GetResponse.
*
* Add this code to your PMPro Customizations Plugin
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*
* @param array $fields the array of fields to send
* @param object $user what is written in the code that we want to change
*/
function my_pmpro_getresponse_custom_fields( $fields, $user ) {
$fields['city'] = $user->city;
$fields['state'] = $user->state;
$fields['company'] = $user->company;
return $fields;
}
add_filter( 'pmpro_getresponse_custom_fields', 'my_pmpro_getresponse_custom_fields', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment