Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created February 11, 2014 09:14
Show Gist options
  • Save strangerstudios/8931605 to your computer and use it in GitHub Desktop.
Save strangerstudios/8931605 to your computer and use it in GitHub Desktop.
Send custom fields from WordPress to AWeber through the PMPro AWeber addon. Your fields must be created already in AWeber and also stored as user meta for the users. Add this code to your active theme's functions.php or a custom plugin.
/*
Send custom fields from WordPress to AWeber through the PMPro AWeber addon.
Your fields must be created already in AWeber and also stored as user meta for the users.
Add this code to your active theme's functions.php or a custom plugin.
*/
function my_pmpro_aweber_custom_fields($fields, $user)
{
$fields['custom_field_name'] = get_user_meta($user->ID, "custom_field_name", true);
return $fields;
}
add_filter("pmpro_aweber_custom_fields", "my_pmpro_aweber_custom_fields", 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment