I am trying to get current members subscription status so I can redirect to members area or subscribe window. Login and currentMember.getMembers work fine. What’s missing?
import { orders } from 'wix-pricing-plans';
$w('#myListOrdersButton').onClick((event) => {
orders.listCurrentMemberOrders()
.then((ordersList) => {
const firstOrder = ordersList[0];
const firstOrderStatus = ordersList[0].status;
console.log('Your orders:', ordersList);
return ordersList;
})
.catch((error) => {
console.error(error);
})
});
Error: Ambassador client request failed: HTTP STATUS: -1 RESPONSE: "Failed to fetch" See the httpStatus and response fields for more information.