Why woocommerce_loop_add_to_cart_link doesn't work within WooCommerce blocks?

Viewed 312

I am creating a site for a friend in Woocommerce using the storefront theme. I have created a child theme and added the below function to the custom functions in functions.php. This is to change the add-to-basket buttons for single products into 'view product' links that point to the product page.

I am using Changing Woocommerce "Add to cart" button to "view product" button answer code.

This works great on everywhere intended across the site exept on WooCommerce Blocks (E.g. hand-picked products, top-rated products etc).

Can anyone tell me why and how I would rectify this?

1 Answers
Related