listCurrentMemberOrders does not show active plan

Hi Experts

Suddenly something that worked for months, no longer works ?

The issue is with this piece of code on one of my page

import { orders } from 'wix-pricing-plans';
let filters = {
orderStatuses: ['ACTIVE']
}
let activeOrder = await orders.listCurrentMemberOrders(filters)
console.log("number:"+activeOrder.length) // As a test

The test return 0, although the current member has a paid plan and it is active ( I can see it in the admin console)

At the same time, I have to use
import { orders } from 'wix-pricing-plans';

As the ‘wix-pricing-plans-frontend’ returns an issue : cannot find module…or it’s correspant type declaration

But this module shall exist see you doc here : wix-pricing-plans-frontend - Velo API Reference - Wix.com

It used to happen to me that a module is somehow not available for a day or 2, but it’s now more than a week

Can you help?

Hey I’m unable to reproduce these issues. This code works fine for me on a user that has a single plan and is logged in to the site. Any other details you can provide?

import { orders } from 'wix-pricing-plans-frontend';

$w.onReady(async () => {

});

$w('#listOrders').onClick(async () => {
    let filters = {
        orderStatuses: ['ACTIVE']
    }
    let activeOrder = await orders.listCurrentMemberOrders(filters)
    $w('#results').text = JSON.stringify(activeOrder);
    console.log("number:" + activeOrder.length) // As a test
})

Example: https://anthonyl5.wixstudio.io/pricing-plans-test

Hi

Well Anthony, you see my screenshot?(sent by the support team?)

First, You can see that the module you used does not work in my environment. It returns an error, and block any further code on my site.
Could you explain and fix this?

Second, then I need to use the older module, but it returns no active paidplan for the active user (sroyer@inness.ch) and you can see on my account that he has an abo.

Third, since the 4th of feb, any new subscriptions do not appear in the « forfait(paidplan) » column on the member page.
Strange coincidence ? Same date my code stopped working

Did you try on my website ? With one of my paidplan ? Did you look at the page I provided to the support team?

Hello

Some follow-up

This morning the module ‘wix-pricing-plans-frontend’

Do not show errors anymore

Did you change something ? Please say yes and explain, otherwise it’s scary if it is that unstable.

To reproduce the bug

Please go on my page admin page, my site, then the page Masterclasses / Your Masterclass page.

Search the function SetUpProgrammeSections

You see that code

// Get all active orders from this member

let filters = {

orderStatuses: [“ACTIVE”]

//paymentStatuses: [“PAID”]

}

let activeOrder = await orders.listCurrentMemberOrders(filters) //orders.listCurrentMemberOrders(filters)

console.log(“number:”+activeOrder.length)

Run the page with my user name sroyer@inness.ch

This account has a paidplan, you can double-check it in the admin pages.

Run the page code, you will be a 0 for console.log(“number:”+activeOrder.length)