Home › Forums › General Issues › Ajax error: Class acf_field not found. › Reply To: Ajax error: Class acf_field not found.
For anyone else who may have this same issue. I just added
require_once('/path/to/wp-load.php');
at the top of my script. Then I run the script via cron. Works like a charm. This is not in functions.php and it’s not run by wp_cron. It’s simply a php file with the line above and my code nothing more.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.