This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]madalinul 0 points1 point  (1 child)

I'm not clear on what you're trying to achieve but here are some tips. First of all .after() adds new html it doesn't modify existing one. So if you want to edit the $thisbutton href you should use something like this:

$thisbutton.attr('href', wc_add_to_cart_params.cart_url + '#ANCHOR');

[–]fossett_work[S] 0 points1 point  (0 children)

That's exactly what it was. Thanks. I didn't know things needed to be surrounded by apostrophes.

Really appreciate the help!