Hi
I am trying to remove the ‘Book It’ button from the single product page using the following code added to the child functions.php file and using plugins (which just produce an error when I try to activate them). However the code is having no affect. Is there something in the theme overriding this code?
/*
- Override via functions.php
**/
if (!function_exists(‘woocommerce_template_loop_add_to_cart’)) {
function woocommerce_template_loop_add_to_cart() {
global $product;
if ( ! $product->is_in_stock() || ! $product->is_purchasable() ) return;
woocommerce_get_template(‘loop/add-to-cart.php’);
}
}
Can you advise how I do this?
Thanks
Ray