Woocommerce | I want to the button 'Add to Cart' on the (all) product-page changed by just 'open product' button.
I know people can click on the image or on the title but I also want a need button (instead of add to cart) to open the product.
Can you guys help me out?
Woocommerce | I want to the button 'Add to Cart' on the (all) product-page changed by just 'open product' button.
I know people can click on the image or on the title but I also want a need button (instead of add to cart) to open the product.
Can you guys help me out?
Share Improve this question asked Jul 14, 2020 at 19:23 markmmarkm 11 Answer
Reset to default 0Try this
function wc_shop_open_product() {
echo '<a class="button demo_button" href="'.get_the_permalink().'">Open product</a>';
}
add_action( 'woocommerce_after_add_to_cart_button', 'wc_shop_open_product' );