After members save 60 item on the database, I need monthly plan or subscription automatically canceled even if the month aren't ending

Hi sir, That is what i did, is that the right code ?

Thank you

import wixData from ‘wix-data’ ;
import wixUsers from ‘wix-users’
// …
let toSave = {
“title” : “Mr.” ,
“first_name” : “John” ,
“last_name” : “Doe”
};

wixData . save ( “myCollection” , toSave )
. then ( ( results ) => {
let items = results . items ; //see item below
let count = items . length
if ( count >= 60 ) {
wixPaidPlans . cancelOrder (1)
}
} )