ACF – Add/update featured image (for videos) by field [closed]

This code will happen when you update the key name.

File: wp-content/plugins/advanced-custom-fields/core/fields/_functions.php
193:        foreach( array('key', 'name', 'type') as $key )
194:        {
195:            // run filters
196:            $value = apply_filters('acf/update_value/' . $key . '=' . $field[ $key ], $value, $post_id, $field); // new filter
197:        }

Try to: print $value, $post_id, $field to understand what you have…
Likely you have some wrong label…

function acf_set_featured_image( $value, $post_id, $field  ){
// print $value, $post_id, $field to understand what you have...
print_r(...);

wp_die();

if($value != ''){
    //Add the value which is the image ID to the _thumbnail_id meta data for the current post
    add_post_meta($post_id, '_thumbnail_id', $value);
}

return $value;
}

// acf/update_value/name={$field_name} - filter for a specific field based on it's name
add_filter('acf/update_value/name=video_thumbnail', 'acf_set_featured_image', 10, 3);