Cannot get a query string parameter
-
Hi,
We are using Woocommerce to display our products.
When customers filter our products, they can end up with a query string like this:
http://www.burgerbar.dk/shop/?filter_farve-type=103&filter_land=51In our code, we have no problems accessing the land parameter like this:
$land = $_GET[filter_land];But we can’t access the farve/type parameter, despite calling it in the same way:
$farvetype = $_GET[filter_farve-type];I have some idea that the problem is the “-“, but if I remove it from the attribute slug, we end up creating a lot of other problems (i.e. I will prefer to not have to remove it)
So can anyone tell me how to fix things, so we can access the farve/type parameter without changing the attribute slug?
Thanks,
Mads
The topic ‘Cannot get a query string parameter’ is closed to new replies.