Discussing APIs and development related to customers, discounts, and order management.
We're building a post purchase app that needs to render if the customer has previously purchased one of the items in the lineItems of the order. The problem is that when you extend
Checkout::PostPurchase::ShouldRender
The variable inputData.initialPurchase.customerId returns null. We could move this to a dynamic order status extension but then we run the risk of not being able to run background processes in time before the window is closed. It seems like it must be a fairly quick fix for Shopify since that variable is already included in inputData.initialPurchase but is just not populated. I'm not anticipating a super quick turnaround, but if you could let me know when you think it may get fixed, that would be very helpful!
Hi there - thanks for letting us know about this. As far as I know that's actually a bug, customerId is supposed to be populated whenever possible. Our team is looking into it, and I'll make sure to let you know once we make progress on it. Thanks!
To learn more visit the Shopify Help Center or the Community Blog.