Using Wordpress Comments *alongside* Discourse

Would I need to edit the plugin itself (and every time it’s updated) or is there a way to hook into this if-else statement to alter the IF part? It looks like this is indeed what I need to target.