Also seeking some support on the premium plugin I have bought. I am looking for a way to disable the plugin on specific products. I’ve come up with the following but seeking assistance determining if this will work before I implement :
function remove__construct() {
global $product;
$ids = array(2679320);
if(in_array($product->ID,$ids)):
remove_action(‘wp_enqueue_scripts’,array($this,’enqueue_scripts’));
remove_action(‘plugins_loaded’,array($this,’load_txt_domain’),99);
remove_action(‘wp_footer’,array($this,’get_popup_markup’));
remove_filter( ‘pre_option_woocommerce_cart_redirect_after_add’, array($this,’prevent_cart_redirect’),10,1);
endif;
}
add_action(‘wp_head’, ‘remove__construct’, 1);
Could you take a gander at that and correct where I’m wrong?