Hi Carolyn,
Google won't automatically ignore what's after the ? and these URLs can be indexed if they are not dealt with correctly.
Usually, query string URLs will be canonicalized to the URL without the query string, which is the correct way to handle it if you don't want them to be indexed.
You'll also have to make sure that the canonical URL is not redirecting.
Your issue sounds like a common Woo Commerce issue where it adds this type of query string to every page on the site, canonicalizes back to the non-query string, but the canonical URL redirects to the query string URL - and in the end Google ignores your canonical tags because they redirect and they index your query string URLs (I hope that makes sense).
There is a setting in Woo Commerce where you can turn off 'Default Customer Location' if you don't want the query string URLs used, but you should check with someone who knows more about the site to make sure that doing so won't cause any unwanted issues.
Cheers,
David