I know you guys aren’t responsible for wp-cli but this is plugin-specific
Hey I’m developing a plugin for a client site and was having the weirdest issue. If I was in my plugin’s folder in terminal and ran any wp-cli command it would fail, but it would work just fine everywhere else. I checked my logs and saw this error:
Call to undefined function acf_include()
Long story short I narrowed the culprit down to acf pro and THEN figured out the conflict was because in my plugin I have a file here:
which conflicts with the ACF Pro file structure.
Bottom line is it seems like L95 of acf.php:
isn’t namespaced so when run from the command line, if you happen to be in a directory where there is an alternate file with same relative path, it fails. It’s such a crazy specific issue! For now I’m going to rename my file or namespace it or something, but maybe you guys should do the same to prevent conflicts.