Hello again,
I tried to use this..
function descuento_puntos() {
//Web service call goes here
$user_id = get_current_user_id();
$precio_producto = get_field('precio');
$puntos_usuario = get_field('puntos', 'user_'. $user_id);
$puntos_restantes = $puntos_usuario - $precio_producto;
$field_key = 'field_54466d765ea42';
update_field($field_key, $puntos_restantes, 'user_'. $user_id);
}
add_action('wpcf7_mail_sent', 'descuento_puntos');
And I don’t get results. The mail is seeded but the update not. Am I doing something wrong?, the update_field() is a ACF (Advanced Custom Files) function, I tested it and work perfect, but for some reason I can’t make that It functions since Contact Form 7 forms.
Sorry, but I’m completely lost. Any help, please?