Scroll to top

How to add button next to add to cart button in shop page in woo-commerce?

Add button next to add to cart button in shop page in woo-commerce.

Are you want to create a custom button next to add to cart button in woo-commerce. if you say yes then follow my steps.
The question is why users want to create an extra button next to the add to cart button.
the first main reason is we can create custom functionality on the custom button. such as create preview, Quick and quick checkout buttons. With these buttons, users can save their time checking and sell products. These buttons create look great on the product page.

We are here for your help. Contact us without any hesitation.
if you want to get any other code for your project you can comment below on this post.

Copy this code in function.php

Copy this code in function.php

add_action( 'woocommerce_after_shop_loop_item', 'view_product_button_shop', 10 );

function view_product_button_shop() {

global $product;

$link = $product->get_permalink();

echo '<a href="' . $link . '" class="button addtocartbutton">View Product</a>';

}

Add button next to add to cart button in shop page in woo-commerce.

Get more information

Read More Posts

Leave a Reply

Your email address will not be published. Required fields are marked *