When you close the checkout sheet, the preloading cache is cleared. This has been raised numerous times as a bug. The core of the issue is we don't not know when the users cart becomes invalid
We need to avoid this pitfall:
The merchant is not calling preload on cart change
The user opens and closes checkout
User modifies cart
User opens checkout and is shown a stale checkout
The assumption in this PR is, if the merchant calls preload once, they are taking responsibility to call it again when cart updates
Ideally we want the best of both worlds:
an up-to-date checkout (obv)
a fast experience for when users just want to temporarily navigate away from checkout (eg to check another product) but doesn't modify the cart
Before you deploy
[ ] I have added tests to support my implementation
What are you trying to accomplish?
Copied description from the swift repo - https://github.com/Shopify/checkout-sheet-kit-swift/pull/97
When you close the checkout sheet, the preloading cache is cleared. This has been raised numerous times as a bug. The core of the issue is we don't not know when the users cart becomes invalid
We need to avoid this pitfall:
The assumption in this PR is, if the merchant calls preload once, they are taking responsibility to call it again when cart updates
Ideally we want the best of both worlds:
Before you deploy