Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.