Has anyone had experience with this? New variants created right before adding to the cart are, most of the time, shown as free products for 20-30 seconds.
If you keep refreshing, eventually the image and correct price show. Until then, only the variant title is correct.
Unsure why the price and image would be unavailable straight away, since as the API returns all the correct information immediately?
Hey @BoxUp , yes! I have had this issue.
The best I could do was assume that while the variant number that is being added to the cart is valid, the Product object has not been updated with the data yet. So when the cart goes to find the information it isn't there, and subsequently, the cart's cache stores blank information for a period of time. This is my working theory, and happy (hopeful!) to be corrected about this.
I was able to work around this, I used setInterval() to regularly query the Product object and when the new Variant id was present, then added it to the cart. A bit hackish I suppose, but it works in the real world.
I'm really keen to hear from anyone else who has faced this issue.