Necesito eliminar el filtro del complemento woocommerce-wholesale-pro. El filtro se agrega en el archivo woocommerce-wholesale-pricing-pro.php y se ve así:
class IGN_Wholesale_Pro_Suite {
function init() {
add_filter( 'loop_shop_post_in', array( $this, 'product_filter' ) );
...
}
function product_filter( $meta_query = array() ) {
...
}
}
Hasta ahora he intentado agregar esto a functions.php en mi tema:
function removeIGNfilter()
{
remove_filter( 'loop_shop_post_in', array('IGN_Wholesale_Pro_Suite', 'product_filter') );
}
add_action('init','removeIGNfilter', 15);
add_action('plugins_loaded','removeIGNfilter', 15);
He intentado también agregar:
remove_filter( 'loop_shop_post_in', array('IGN_Wholesale_Pro_Suite', 'product_filter') );
después:
add_filter( 'loop_shop_post_in', array( $this, 'product_filter' ) );
en el archivo de complementos en la función init() pero no funciona. Pero cuando lo cambio a esto:
remove_filter( 'loop_shop_post_in', array($this, 'product_filter') );
Funciona.
¿Hay alguna manera de eliminar este filtro de mi tema?
.