I want add a custom Button \"View Demo\" next to \"Add to Cart\" button of WooCommerce based on Product Type, both on main shop page and single product page.
I\'ve d
For some reason LoicTheAztec's answer did not do it for me.
Here is what worked:
function wc_shop_demo_button() { echo 'View Demo'; } add_action( 'woocommerce_after_add_to_cart_button', 'wc_shop_demo_button' );
Hope that helps someone in their journey.