How to change WooCommerce Add to Cart Button based on Availability
<p>I am trying to have the "Add to Cart" button change to "Make an Inquiry" and I would like that to link to either a tab further down the page or to a separate page all together. I would like this change to be based on availibilty or whether or not the price is listed.I already have a basic understanding on how to change the link and text conditionally, but just not based on the parameters and to the scope I need.</p>

<p>I know this response is incredibly late but below is what I have. The problem I have is that it is not in the position of the the original add to cart button, and its too wide.</p>

<pre><code>add_action('woocommerce_single_product_summary','replace_add_to_cart');
    function replace_add_to_cart() {
    global $product;

        if ( ! $product-&gt;is_in_stock() ){
            remove_action( 'woocommerce_single_product_summary','woocommerce_template_single_add_to_cart', 30 );
            add_action( 'woocommerce_single_product_summary','consult_bezambar_expert', 30 );

    function consult_bezambar_expert() {
    global $product;

        echo '&lt;form action="' . esc_url($product-&gt;get_permalink( "#tab- reviews" )) . '" method="get"&gt;
            &lt;button type="submit" class="single_add_to_cart_button button alt"&gt;Consult Bez Ambar Expert&lt;/button&gt;
            &lt;/form&gt;';
        }
    }
}
</code></pre>