Hi @rakiem,
Perfect! I suggest you always use if( function_exists( … ) )…., if( class_exists( … ) ) …. instead of if( in_array( $plugin, get_option( ‘active_plugins’ ) ) … to check if LearnDash or whatever plugin is active.
The option get_option( ‘active_plugins’ ) is filtered by Freesoul Deactivate Plugins to do its job, but FDP has to remove all its filters before the first standard plugin loads. This is to avoid more serious issues like having a plugin that is globally disabled.
There are some plugins that if they see a certain plugin is not active, then they disable themselves by updating the option ‘active_plugins’.
If this kind of plugin does it when the filter of FDP is still there, then you can imagine the result. The plugins that were disabled by FDP using the filter are disabled globally, and you find them disabled on the page of plugins.
My suggestion is never to use get_option( ‘active_plugins’ ) to check if a certain plugin is active, but always check the function or class that you are going to use in your code.
Have a great day!
Jose