28 May 2020

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

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


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>';

}

No comments:

Post a Comment

How to add re-captcha v3 on all Elementor forms using coding?

 Add re-captcha v3 on all Elementor forms using coding add_action('wp_footer',function(){     ?> <script src="https://www...