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.