That looks like a Gravity Forms function, is that correct? If so, does the form get triggered multiple times?
Can you add a simple debug line to the function and see if that gets repeated? I sometimes add a snippet to send myself an email. I include the data fields to ensure they contain the info, if the function then fired twice, you’d get two emails, so would then know to check GF rather than ACF
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users