Add product to cart when clicking the product image on archive pages in WooCommerce

Viewed 194

I am looking for the next solution in WooCommerce

Currently, when a customer clicks the product image on an archive page in WooCommerce, the single product page opens.

However, I would like to add the functionality that the product is immediately added to the shopping cart as opposed to opening the single product page

I don't know which code to apply but I tried with below code

add_filter ('woocommerce_product_single_add_to_cart_text', 'custom_add_to_cart_button_woocommerce');
0 Answers
Related