Home › Forums › ACF PRO › Fatal error: call to undefined function is_plugin_active() › Reply To: Fatal error: call to undefined function is_plugin_active()
I added it like this and so far it seems to have fixed the problem.
// ensure is_plugin_active() exists (not on frontend)
if( !function_exists('is_plugin_active') ) {
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
// bail early if not a plugin (included in theme)
if( !is_plugin_active($basename) ) {
return $transient;
}
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.