Ajax a php file that has Advanced Custom Fields in it

Sending an AJAX request to a specific file is not the way to do AJAX in WordPress. This is because WordPress itself is not loaded by your file, so you wouldn’t be able to use WordPress functions without an error.

There are two proper ways to handle AJAX requests in WordPress: