Ok first post here, I am a bit of a noob when it comes to this sort of thing. So apologies if the answer is easy.
I am trying create a link and echo a custom URL plus also grab the current ID of that product. I have the link working but having trouble adding wc_get_page_id after ?add-to-cart=
echo '<a href="/basket/?add-to-cart=52&quantity=12">MY CUSTOM LINK</a>';
I have tried numerous ways to do this but none are working. any tips would be greatly appreciated.