Hello,
Unfortunately, in order to achieve this effect, modifications need to be made to the files of the plugin “Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro”. This is not a good practice, as the fix will be lost after the plugin is updated.
We kindly ask you to contact the plugin authors with the question why their actions cannot be disabled using the WordPress hook system. For example, the following code can be used:
remove_action(‘woocommerce_simple_add_to_cart’, array(‘CWG_Instock_Notifier_Product’,’display_in_simple_product’), 31);
add_action(‘wp’, function() {
remove_action(‘woocommerce_simple_add_to_cart’, array(‘CWG_Instock_Notifier_Product’,’display_in_simple_product’), 31);
}, 20);
We hope they will provide a way to disable (or change the order of) the hooks without having to modify their plugin code.
Best Regards,
8Theme’s Team