Support

Account

Home Forums ACF PRO acf_add_local_field not updating on save when auto-adding fields Reply To: acf_add_local_field not updating on save when auto-adding fields

  • Hi @iamhexcoder

    That’s because, at some point when ACF saves the data, the $_GET['post'] global variable is not available. Could you please try to get the ID like this:

    if( isset( $_GET['post'] ) ){
        $post_id = $_GET['post'];
    } elseif ( isset( $_POST['post_ID'] ) ){
        $post_id = $_POST['post_ID'];
    } else {
        $post_id = '0';
    }

    I hope this helps 🙂