I have an event based WordPress website on that I sell tickets using WooCommerce. Is there any way to hide the \"add to cart\" button for the product having cost zero?
You write this code in your theme function.php
function.php
function remove_add_to_cart_on_0 ( $purchasable, $product ){ if( $product->get_price() == 0 ) $purchasable = false; return $purchasable; } add_filter( 'woocommerce_is_purchasable', 'remove_add_to_cart_on_0', 10, 2 );