I’m struggling to get onCartCompleted, onCartCompleted or onNewOrder to fire. I’m currently testing this by using wixData.insert into a logs collection. I can confirm my wixData.insert code does work correctly on a page’s own code, but not in Backend/events.js.
I have tested on both the preview site and the live published site.
I’m currently using onCartCreated for the simplicity of testing, what am I doing wrong?
import wixData from 'wix-data';
import wixStores from 'wix-stores';
import wixStoresBackend from 'wix-stores-backend';
export function wixStoresBackend_onCartCreated(event) {
wixData.insert("logs", { "log": "test from events" });
}