What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Post purchase extension shouldRender doesn't get the customerId

Post purchase extension shouldRender doesn't get the customerId

fullmetal
Shopify Partner
13 0 2

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!

Reply 1 (1)

denislins
Shopify Staff
7 1 1

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.