fix: send memberid on checkout
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
});
|
||||
|
||||
async function handleClick(plan, planName: string) {
|
||||
if (plan.CTA.IS_DISABLED || !$profile.id || !$profile.email) {
|
||||
if (plan.CTA.IS_DISABLED || !$profile.id || !$profile.email || !$currentOrg.memberId) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
checkoutURL.searchParams.set(
|
||||
'metadata',
|
||||
JSON.stringify({
|
||||
triggeredBy: $currentOrg.roleId,
|
||||
triggeredBy: $currentOrg.memberId,
|
||||
orgId: $currentOrg.id,
|
||||
orgSlug: $currentOrg.siteName
|
||||
})
|
||||
|
||||
@@ -48,6 +48,7 @@ export const currentOrg: Writable<AccountOrg> = writable({
|
||||
parentOrganizationId: null,
|
||||
plans: [],
|
||||
readOnlyUntil: null,
|
||||
memberId: 0,
|
||||
roleId: 0,
|
||||
settings: {},
|
||||
siteName: '',
|
||||
|
||||
Reference in New Issue
Block a user