Hi Xtemos
We have a webhook code for removing the buybutton when price is zero – And it works for standard themes !
But when I activate woodmart-theme, the code stops working!?
Webhook code:
add_action(‘woocommerce_single_product_summary’, ‘replace_zero_price_button_single’, 30);
function replace_zero_price_button_single() {
global $product;
$price = $product->get_price();
if (empty($price) || $price == 0) {
remove_action(‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30);
remove_action(‘woocommerce_simple_add_to_cart’, ‘woocommerce_simple_add_to_cart’, 30);
remove_action(‘woocommerce_variable_add_to_cart’, ‘woocommerce_variable_add_to_cart’, 30);
remove_action(‘woocommerce_grouped_add_to_cart’, ‘woocommerce_grouped_add_to_cart’, 30);
remove_action(‘woocommerce_external_add_to_cart’, ‘woocommerce_external_add_to_cart’, 30);
}
}
I have made you a login