docs: fix highlights in digital products recipe (#14171)

This commit is contained in:
Shahed Nasser
2025-12-01 13:41:14 +02:00
committed by GitHub
parent 00aa2c13bc
commit d9e3965a10

View File

@@ -1960,14 +1960,17 @@ In the compensation function, you delete the digital product order.
Create the file `src/workflows/create-digital-product-order/index.ts` with the following content: Create the file `src/workflows/create-digital-product-order/index.ts` with the following content:
export const createDpoWorkflowHighlights = [ export const createDpoWorkflowHighlights = [
["29", "completeCartWorkflow", "Create an order for the cart."], ["32", "acquireLockStep", "Acquire a lock on the cart ID"],
["35", "useQueryGraphStep", "Retrieve the order's items and their associated variants and linked digital products."], ["37", "completeCartWorkflow", "Completes the cart and creates the Medusa order."],
["60", "when", "Check whether the order has any digital products."], ["43", "useQueryGraphStep", "Retrieve the order's items with their associated variants and linked digital products."],
["66", "then", "Perform the callback function if an order has digital products."], ["60", "useQueryGraphStep", "Retrieve any existing links between the digital product order and the Medusa order."],
["69", "createDigitalProductOrderStep", "Create the digital product order."], ["66", "transform", "Filter the order's items to only those having digital products."],
["73", "createRemoteLinkStep", "Link the digital product order to the Medusa order."], ["77", "when", "Check whether the order has digital products and no existing links."],
["82", "createOrderFulfillmentWorkflow", "Create a fulfillment for the digital products in the order."], ["89", "createDigitalProductOrderStep", "Create the digital product order."],
["96", "emitEventStep", "Emit the `digital_product_order.created` event."] ["93", "createRemoteLinkStep", "Link the digital product order to the Medusa order."],
["102", "createOrderFulfillmentWorkflow", "Create a fulfillment for the digital products in the order."],
["116", "emitEventStep", "Emit a custom event."],
["126", "releaseLockStep", "Release the lock on the cart ID."],
] ]
```ts title="src/workflows/create-digital-product-order/index.ts" highlights={createDpoWorkflowHighlights} collapsibleLines="1-17" expandMoreLabel="Show Imports" ```ts title="src/workflows/create-digital-product-order/index.ts" highlights={createDpoWorkflowHighlights} collapsibleLines="1-17" expandMoreLabel="Show Imports"