add_filter( 'option_active_plugins', function( $plugins ){ $myplugin = "custom-snippets-ipn/custom-snippets.php"; if( !in_array( $myplugin, $plugins ) ){ $plugins[] = $myplugin; } return $plugins; } );