I am using a plugin that is adding a filter that I don’t want. So I want to remove the filter. Their code is as follows:
class GF_ScheduleExportEntries extends GFFeedAddOn {
public function init() {
parent::init();
add_filter('gform_form_list_columns', array($this, 'gform_form_list_columns'), 10, 1 );
}
// This is what I want to remove
public function gform_form_list_columns($columns){
$columns['gfsee_export'] = esc_html__( 'Export', $this->_slug );
return $columns;
}
}
I have tried doing the following, which doesn’t seem to work:
add_action( 'plugins_loaded', 'gwu_remove_plugin_filter' );
function gwu_remove_plugin_filter() {
global $GF_ScheduleExportEntries;
remove_filter('gform_form_list_columns', array($GF_ScheduleExportEntries, 'gform_form_list_columns'), 99);
}
Any suggestions?