This is for single sites only:
if ( is_plugin_active('plugin-directory/plugin-file.php') ) { // the plugin is active }
How can I apply same functions to Multisite network, check if any specific plugin is active now?
Check If A WordPress Plugin Is Active
Try this code for Multisite:
if( is_plugin_active_for_network( 'woocommerce/woocommerce.php') ) return;
source:
https://wp-buddy.com/blog/check-wordpress-plugin-sitewide-active-network-active/
only problem is if you use this code in a theme, you can’t use condition of is_network_admin cuz theme is not loaded there.
is_network_admin
That’s true but you can still target is_main_site instead if you want to limit visibility from child sites.
is_main_site
another good article:
How to check if WooCommerce is activated on WP multisite
Enter the destination URL
Or link to existing content