Skip to content

Commit 05d3b4d

Browse files
densumeshskeptrunedev
authored andcommitted
bugfix: fix app subscription updates
1 parent 794fd2b commit 05d3b4d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

22
SHOPIFY_API_KEY=35eede841ebb457fb68f6eada8e1d780
33
SHOPIFY_TRIEVE_PDP_QUESTIONS_ID=51815e62-ddad-408b-afb9-6f804648f89f
4-
SHOPIFY_GLOBAL_COMPONENT_ID=6c762bf0-fbc4-47bd-9370-514048760d5c
4+
SHOPIFY_GLOBAL_COMPONENT_ID=6c762bf0-fbc4-47bd-9370-514048760d5c
5+
SHOPIFY_TRIEVE_CHECKOUT_WEB_PIXEL_ID=b3a72834-5d8a-48a9-8584-092c57ab8c9d

clients/trieve-shopify-extension/app/routes/webhooks.app.app_subscriptions.update.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ export const action = async ({ request }: ActionFunctionArgs) => {
2020
const key = await validateTrieveAuthWehbook(shop);
2121
const trieve = sdkFromKey(key);
2222

23-
console.log(`Received ${topic} webhook for ${shop}`, payload);
23+
console.log(`Received ${topic} webhook for ${shop}`);
2424
const organization_id = await db.apiKey.findFirst({
2525
where: {
26-
shop: `https://${shop}`,
26+
shop,
2727
},
2828
});
2929
if (!organization_id) {
@@ -43,7 +43,6 @@ export const action = async ({ request }: ActionFunctionArgs) => {
4343
}
4444
`,
4545
);
46-
console.log("Subscription data", data);
4746
} catch (error) {
4847
console.error("Failed to fetch subscription data:", error);
4948
data = null;
@@ -66,8 +65,6 @@ export const action = async ({ request }: ActionFunctionArgs) => {
6665
},
6766
};
6867

69-
console.log("Trieve payload", trievePayload);
70-
7168
await trieve.handleShopifyPlanChange(
7269
trievePayload,
7370
process.env.SHOPIFY_SECRET_KEY || "",

0 commit comments

Comments
 (0)