Hello everybody,
Is there the possibility to define a hook after each order to write information into an extra database:
export function Stores$Orders_afterAdd(item, context) {
wixData.insert("newDB", item)
.then((results) => {
console.log("uploaded order to newDB!");
})
// something went wrong
.catch((error) => {
console.log("error cannot upload order to newDB" + error)
});
}
Thank you so much guys,
you are just amazing.