Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Skip if the clickEvent not found

Kiran Kc0c0487f8103
diff --git a/apps/web/app/(ee)/api/shopify/integration/webhook/orders-paid.ts b/apps/web/app/(ee)/api/shopify/integration/webhook/orders-paid.ts
index f97d4b53d0..908594d39d 100644
--- a/apps/web/app/(ee)/api/shopify/integration/webhook/orders-paid.ts
+++ b/apps/web/app/(ee)/api/shopify/integration/webhook/orders-paid.ts
@@ -97,10 +97,11 @@ export async function ordersPaid({
const clickEvent = await getClickEvent({ clickId });
if (!clickEvent) {
- console.warn(
- `Click event not found for the clickId ${clickId} from note_attributes`,
- );
- clickId = undefined;
+ return "[Shopify] Click event not found. Skipping the order...";
+ }
+
+ if (clickEvent.workspace_id !== workspace.id) {
+ return "[Shopify] Click event not found in the workspace. Skipping the order...";
}
}