having a issue with getting a ACF field associated with a user profile to update after a gravity form submission. As it stands, this logic currently does nothing :(. So i’m hoping someone can help out. Here is waht I have so far:
//changes studio status after those forms submit
function update_user_tour_status($entry, $form){
$user_id = $entry['created_by'];
$state = update_user_meta('user_'.$user_id, 'artist_tour_status', 'studio');
}
add_action('gform_after_submisson_7', 'update_user_tour_status', 10, 2);
So it should be pretty straight forward I would image, but it just seems to do nothing.
2
Answers
According to the
update_user_meta();
reference, the first argument should only be the user’s ID.user_
does not need to be appended, as the function expects an integer, not a string. Drop theuser_
prefix, and it should work like a charm.Check update_user_meta()