Open CBCzed opened 10 months ago
Bumping this issue because I'm also having issues with storage data failing. This issue only happens in production, it works as expected on my development store. In production Checkout::PostPurchase::ShouldRender gets called and the api properly returns the needed data and calls storage.update to store the data. Then on the post purchase page I'm using the useExtensionInput hook to retrieve the data, the page renders fine but storage returns undefined (only in production, it works in development).
Please list the package(s) involved in the issue, and include the version you are using
Describe the bug
In one page checkout,Post purchase extension API Checkout::PostPurchase::ShouldRender is called and the data is stored in localStorage using storage.update in the callback function. But sometimes the storage.initialData is undefined through the useExtensionInput<'Checkout::PostPurchase::Render'>() API
Steps to reproduce the behavior:
Expected behavior
The data can be obtained normally.
Screenshots
These two images show our code.
The handleReportRender function in the two screenshots above is the function we use to collect the logs.
These image shows the logs we collected during the Post purchase extension point Checkout::PostPurchase::ShouldRender phase.
These image shows the logs we collected during the Post purchase extension point Checkout::PostPurchase::Render phase. we get results from extension api and the data is null.
Additional context
No.