Created
February 11, 2014 09:14
-
-
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.
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
/* | |
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