Reputation: 49
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?
Upvotes: 2
Views: 752
Reputation: 253784
This is a bug (I reported that in Github WooCommerce Blocks opening an issue).
For now, instead you can use any WooCommerce Shortcode in a "paragraph" Block, which works without bugs using Changing Woocommerce "Add to cart" button to "view product" button, like:
Upvotes: 3