The plugin works however i also tested the code you embedded in this post which uses plugins_loaded and it didn't work for me from functions.php.

What worked was using the filter on its own in functions.