Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JarrydLong/e8752642cbf62275d78054e677cf1f09 to your computer and use it in GitHub Desktop.
Save JarrydLong/e8752642cbf62275d78054e677cf1f09 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.
<?php
/*
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)
{
if( !empty( $_REQUEST["phone"] ) ){
$fields['phone'] = $_REQUEST["phone"];
}
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