Remove filter from WordPress Plugin

You can’t just add remove_filter() and have it remove the filters.

remove_filter() always has to happen after the callback you want to remove is added. Your remove_filter() call is most likely run before the plugin’s add_filter().

You need to find where/when that plugin hooks canonicalize_front_end() and then run your removal accordingly (i.e. at or after that).

For example, if canonicalize_front_end() is run at the init action, then you could do the following:

add_action( 'init', 'my_remove_filter' );
function my_remove_filter() {
    remove_filter( 'get_canonical_url', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'canonical_url' ), 10, 2 );
    remove_filter( 'wpseo_canonical', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'wpseo_canonical_url' ) );
}

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduedueduseduseduedusedueduedu