• I am using this shortcode to display products [product_category category=”extras” orderby=”date”].

    Variable products show “Select Options” and single products show “add to cart”. I was able to change text of both to say “View Product”.

    The problem now is that I need to change the url of those that used to be “add to cart”, as they don’t link to the product page but to the cart.

    I know I can edit the woocommerce template, but I would need this as a function to be added to function.php

    I don’t need any button involved, just replacing the url.

    So again purpose:
    Replace/redirect “Add to Cart” url to link to product page (only in loop, obviously not in product page).

    Can someone help?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce replace add to cart url to link to product page’ is closed to new replies.