Calling cmb2_get_option in "init"
-
Hi,
Was searching for a solution to an issue which was raised on GitHub: https://github.com/WebDevStudios/CMB2/issues/94. Couldn’t see that the guy had raised the issue at this end however.
The issue I am having is very similar. I am essentially calling “cmb2_get_option” inside action “init” but getting Fatal Error: call to undefined function.
I also tried to invoke the underlying function: “CMB2_Options::get( $key )->get($field_id);” but I get “Class Not Found”
I have used the old CMB library before but for the life of me, I can’t honestly remember if I ever had the cause to call the old function “cmb_get_option” in init so not sure if this has ever turned up for me before.
I’m not a WordPress “superstar” but from what I can make out, “init” occurs after “plugins_loaded” so I would have assumed that the plugin would all be available by the “init” stage?
Is this something you are aware of? Also, if you could you advise on how I can access an option set up with CMB2 with the plain ole “get_option” that WordPress supplies?
Thanks in advance.
- The topic ‘Calling cmb2_get_option in "init"’ is closed to new replies.