• HI I used php to add a return to shop button after the woocommerce add to cart button, but some products don’t have prices and are only for add to quote, so I think it would be better to place the button there but looking at the chrome inspector for the css I can’t find the right string

    below is my code for next to add to cart button

    maybe it could be if there is no add to cart button then display it also but I am not familiar with your code i think it is simple css that I need

    add_action( 'woocommerce_after_add_to_cart_button', 'my_function_sample', 10 );
    function my_function_sample() {
        global $product;
        
    	echo "<button type='button' onclick=\"location. class='single_add_to_cart_button button alt wdm_enquiry' style='background:rgb(0, 171, 0) none repeat scroll 0% 0%';>Back to Shop</button>";
    
    
    	 
    }
    

    thanks for any help

Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Return to shop button after the request a quote button’ is closed to new replies.