Paid Plan from editor/preview

I have searched other posts on this but haven’t found an answer. The following code has been working on both my published site and in preview. Recently, it stopped working in preview, returning the error “Failed to fetch” in the catch. I am admin on the site but I also have a valid subscription. The existing published site still performs correctly but I am reluctant to republish to debug as a. usining the live site site to debug is contrary to any good practice and b. I may make a working site fail ( which is probably the same thing).

export async function hasLicense ( ) {
let orders , returnValue = “NOTACTIVE” ;
try {
orders = await wixPaidPlans . getCurrentMemberOrders ();
console . log ( orders );
} catch ( error ) {
console . error ( “license” , error );
}
//other code
}