You'll get the value as the first parameter, or you could get it out of $request, which is a WP_REST_Request object. Since you're using POST
, the parameters out of $request->get_body_params()
which will return an array. If you just need the actual meta value, you don't need to do this.
Your callback function should look something like this:
function user_meta_update_callback( $value, $user, $field_name, $request ) { update_user_meta( $user[ 'id' ], $field_name, $value );}