Reply 347924 to: Back In Stock Notifier for WooCommerce compatibility for single products

Avatar: Andrew Mitchell
Andrew Mitchell
Support staff
February 24, 2023 at 17:00

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

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.