Here's my code
- Code: Select all
$team_member = get_userdata(intval($team_member_id));
$team_member_donations_collected = $team_member->wp_s2member_custom_fields["donations_collected"];
$team_member_donations_collected_update = (int)$team_member_donations_collected + (int)$amount;
//this last line causes an error
update_usermeta( $team_member_id, wp_s2member_custom_fields["donations_collected"], $team_member_donations_collected_update );
How should I be updating this custom field with the new number?