Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy

To resolve the issue with Gravity Forms and the Advanced Post Creation Add-On not updating ACF fields on a custom taxonomy, you can try adding the following code snippet to your WordPress theme’s functions.php file:

add_action( 'gform_post_create_post', 'update_custom_taxonomy_acf_fields', 10, 3 );
function update_custom_taxonomy_acf_fields( $post_id, $form, $entry ) {
    // Check if the custom taxonomy term is set in the Gravity Form entry
    $custom_taxonomy_term = rgar( $entry, 'custom_taxonomy_field_id' );
    if ( ! $custom_taxonomy_term ) {
        return;
    }

    // Update the custom taxonomy term for the post
    wp_set_object_terms( $post_id, $custom_taxonomy_term, 'custom_taxonomy', false );

    // Update the ACF field for the custom taxonomy term
    update_field( 'acf_field_name', $custom_taxonomy_term, $post_id );
}

In this example, the code uses the gform_post_create_post action to hook into the Advanced Post Creation Add-On and update the custom taxonomy term and ACF field when a post is created. The code first checks if the custom taxonomy term is set in the Gravity Form entry, and if it is, it uses the wp_set_object_terms() function to update the custom taxonomy term for the post and the update_field() function from the Advanced Custom Fields plugin to update the ACF field.

Note: Make sure to replace “custom_taxonomy_field_id” with the actual field ID for the custom taxonomy field in your Gravity Form, “custom_taxonomy” with the actual name of your custom taxonomy, and “acf_field_name” with the actual name of your ACF field.