I currently run the following query on a run.graphql:
query RunInput($tags: [String!]) {
cart {
lines {
id
quantity
merchandise {
... on ProductVariant {
id
product {
handle
hasAnyTag(tags: $tags)
}
}
__typename
}
}
}
}
I can confirm there is a discount code with this metafield by checking the metafields:
"node": {
"id": "gid://shopify/Metafield/32266103455929",
"key": "\"discountSpecs\"",
"value": "{\"selectedCollectionIds\":[\"gid://shopify/Collection/310827712556\"],\"tags\":[\"CL Og test\",\"VIP234234\"]}",
"namespace": "cldiscounts"
}
I have a product with the tag CL Og test
In a shopify function I’m trying to check if the tag exists in a product.
I have the shopify extension toml checking for the variables:
[extensions.input.variables]
namespace = "cldiscounts"
key = "discountSpecs"
hasTags continually says FALSE. Any idea why this is happening. I’m sure that it should be TRUE.