Add attributes query strings to product links


I have the website set up so that the customer can shop by category and then sub-category. Once the customer is in the sub-category we have all the available product permalinks (this is using Woocommerce).

What I’d like to do is append each of these product links with a query string to pre-select the attributes on the product’s actual page based on the sub-category I’m in.

I’ve worked out how to grab what the param will be, I just can’t understand how I’d be able to append the product links on the page.

Matthew Jones 4 months 0 Answers 26 views 0

Leave an answer