if( defined( 'WPB_VC_VERSION' ) ) { ... }
works like a charm. I was looking for an opportunity to hide the Nag screen that appears when you get WPBakery Page Builder as a plugin with a commercial theme to avoid confusion with clients. In case someone might need this snippet:
// hide nag screen of WP Bakery Visual composer if found if( defined( 'WPB_VC_VERSION' ) ) { if(!isset($_COOKIE['vchideactivationmsg_vc11'])) { setcookie('vchideactivationmsg', '1', strtotime('+3 years'), '/'); setcookie('vchideactivationmsg_vc11', WPB_VC_VERSION, strtotime('+3 years'), '/'); } }
Connect this to admin_init and you're done!
source share