Skip to main content

pos.purchase.post.block.render
Target

Renders a custom section within the native post purchase screen

Was this section helpful?

Block

jsx

import {render} from 'preact';

export default async () => {
render(<Extension />, document.body);
};

const Extension = () => {
return (
<s-pos-block>
<s-button
slot="secondary-actions"
onClick={() => shopify.action.presentModal()}
>
Open action
</s-button>
<s-text>This is a block extension</s-text>
<s-text>Order ID: {shopify.order.id}</s-text>
</s-pos-block>
);
};