Forked from strangerstudios/my_pmpro_getresponse_custom_fields.php
Last active
December 20, 2018 17:03
Star
You must be signed in to star a gist
Sync user fields with GetResponse with PMPro GetResponse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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