Hi all
I have a google maps field with the name “location”, everytime somebody changes that field, I want that the a specific part of the google maps data (state_short) is saved to another ACF field with the name state_short.
I tried doing it this way, but doesnt work.
function update_state_short( $value, $post_id, $field ) {
update_post_meta( $post_id, 'state_short', $value['state_short'] );
return $value;
}
add_action('acf/update_value/key=field_5e5a38be195bc', 'update_state_short', 10, 3 );
How is that possible?