Home › Forums › Bug Reports › acf_get_value notice incorrect › Reply To: acf_get_value notice incorrect
In this comment you stated:
Yes wrapping it in acf/init suppresses the notice but as the documentation states it should not be required. acf_maybe_get_field triggers init before it gets the value. So even without wrapping it will always be initialized looking at the code.
In addition, acf_maybe_get_field() triggers acf/init and it does this prematurely. The code in ACF is looking to see if the main WP “init” hook has been fired, as I posted in this comment. Initializing ACF prematurely does not cause this hook to fire prematurely.
Premature initialization of ACF can cause all kinds of undesirable side effects.
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.