The most irritating WordPress bugs are the ones that say nothing. remove_filter() is a good example: you call it, nothing happens, and nothing is reported either.
add_filter( 'the_title', 'plugin_shout_title', 20 );
// later, from your own code:
remove_filter( 'the_title', 'plugin_shout_title', 20 );
The docs are strict about this. The callback and the priority must match what was used when the hook was added, and the priority defaults to 10. If the plugin registered the filter at priority 20 and you call remove_filter() without the 20, the callback stays attached. The docs also note that no warning is given on removal failure.
The function returns a bool: whether the function existed before it was removed. That makes it useful for debugging. Wrap it in a check and you know right away if you missed:
if ( ! remove_filter( 'the_title', 'plugin_shout_title', 20 ) ) {
error_log( 'plugin_shout_title was not attached at priority 20' );
}
Two more things from the reference. The removal has to run after the filter was added, so removing it too early does nothing. And a filter added by a class method needs the class instance, since you pass an array with the object and the method name. For a plugin that keeps its object to itself, that can be a real obstacle. Closures have the same problem: without a reference to the closure you can’t remove it.
The function name, plugin_shout_title, is made up for this example. The same function also removes actions, through the separate remove_action().
Further reading: remove_filter() reference