I have a problem with my code. I create a new variation with the API, add it to the cart then redirect to the cart page. The cart page will then contain the newly added item, but with a price of $0. If a wait a little bit or refresh, the price will be set correctly. I feel like Shopify needs to process something before making the price available. I know I can fetch cart.js until the price is okay, but I was wondering if there is any other way to wait for the price to bet set before redirecting to the cart page.
When the page loads, the expected behavior will resume.
Would it be possible to post the code you wrote to do this? I'd like to see what's going wrong.
Also correcting it would be easier.