woocommerce offtopic – Is there a way to conditionally check if i’m on product variation page url like mydomain.com/myproduct?attribute_pa_color=red

Question

I want to filter the output of the structured data only when i’m on page like this :
mydomain.com/myproduct?attribute_pa_color=red

A variation page with the attributes in the url

The reason is rules violations with Google Merchant, price missmatch- so need to change the data to show only the variation price in structured data – without this modification the data is inherit from the the parent product (lowest price and highest price etc)

Hope i’m clear
Thanks

0
fab4_33 1 week 2023-01-19T04:04:06-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse