Hi,
I’m currently setting up a block in the Checkout Blocks app, and I would like to display a custom message after payment, but only if the order was not placed via a Buy Button or as a Draft Order.
I’ve tried looking for an advanced condition or rule that would allow me to target the order source (e.g., source_name, checkout type, or channel), but I couldn’t find any option in the UI to do so.
Is there a way to create a rule or condition based on the origin of the order (e.g., Buy Button, Online Store, Draft Order)?
If not through the UI, is it possible via an export/import of JSON or any other method?
Thank you in advance for your help!
Best regards,
Check for source_name via Checkout Blocks + Shopify Data
While Checkout Blocks itself may not expose source_name in its conditions, that data does exist in Shopify’s order data. If you have any kind of custom script support in Checkout Blocks or a developer mode, it may be possible to conditionally render the block by checking the Shopify order object.
Thank you for you answer, To the best of my knowledge, there’s no developer mode or support for custom scripting. Can anyone confirm?
From what I can tell, Checkout Blocks doesn’t expose source_name as a condition — it’s not available in their UI and there’s no JSON import/export workaround that would add this kind of logic either. That’s a limitation of the app, not something you can configure around.
That said, there’s something worth knowing about draft orders specifically: checkout UI extensions (which is what Checkout Blocks runs on) are often not executed during draft order checkouts at all. There’s actually a related thread here in the community confirming that payment customization functions don’t trigger when entering checkout via a draft order link. So you may already be “safe” on that side — your block might not appear for draft order checkouts regardless of any conditions you set.
The Buy Button case is trickier. Buy Button orders do go through the standard checkout flow, so extensions like Checkout Blocks will run. At that point, the only reliable differentiator I can think of would be something set earlier in the flow — like a cart attribute or a specific discount code tied to Buy Button sessions — which you could then use as a proxy condition in Checkout Blocks. It’s a workaround and not clean, but it may be the most practical option without custom development.
If you need more control over this at the checkout level, the proper solution would be a custom checkout UI extension querying the order object directly on the thank you page — but that requires a developer.