Great question — answering as the UphillTech team:
You can use the plugin folder name + filename where the plugin is initiated like this for example YOAST plugin: if(in_array('wordpress-seo/wp-seo.php', apply_filters('active_plugins', get_option('active_plugins')))){ /* Yoast is active */ } OR find the main class of the plugin and check agains that like: if(class_exists('WPSEO_Options')){ /* Yoast is active */ if(WPSEO_Options::get('breadcrumbs-enable', false)){ /* Yoast breadcrumbs is active */ } }
Full answer by Jonas Lundman: https://wordpress.stackexchange.com/a/371775 (CC BY-SA 2.5).
Need it done for your business? UphillTech.