I have 4 advanced custom fields and I would like to save each field value when it is changed on the post and not have to wait until the post is saved.
I'm using acf/save_post
action. Here is my code so far:
function my_acf_save_post( $post_id ) {
$fields = false;
if( isset($_POST['acf']) ) {
$fields = $_POST['acf'];
}
}
add_action('acf/save_post', 'my_acf_save_post', 1);