Woocommerce problem
I write new action to change button " add to cart " in archive page.
Here is my code :
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
add_action( 'woocommerce_after_shop_loop_item', 'my_woocommerce_template_loop_add_to_cart', 10 );
'my_woocommerce_template_loop_product_link_close', 5 );
function my_woocommerce_template_loop_add_to_cart() {
echo '
Add to cart <i class="icon-shopping-cart"></i>
';
}
Button changed ! but problem is, when i press " Add to cart " button, it will be redirect to product details page...
I think i have to do something with : woocommerce_template_loop_product_link_close
But I dont know how
So, can you help me ? Thank you !