Hi Steven ![]()
The getMember( ) method returns a Promise, and you’re not waiting for it, change the event function into an async function, and add the await keyword before calling the above method.
export async function wixPaidPlans_onPlanPurchased(event) {
const member = await members.getMember(event.order.memberId, {fieldsets: ['FULL']});
console.log(member); // Should print:
/* {
_id: "random_text",
loginEmail: "email@domain.com",
status: "APPROVED",
....
} */
}
Hope this helps~!
Ahmad