This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Upserts a menu ordering settings entity for a given menuId
.
Try to create a menu ordering settings, in case it already exists - update the menu ordering settings
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function upsertMenuOrderingSettingsByMenuId(
menuId: string,
menuOrderingSettings: UpsertMenuOrderingSettingsByMenuIdMenuOrderingSettings,
options: UpsertMenuOrderingSettingsByMenuIdOptions,
): Promise<UpsertMenuOrderingSettingsByMenuIdResponse>;
ID of the menu these settings apply to.
import { menuOrderingSettings } from "wix-restaurants.v2";
async function upsertMenuOrderingSettingsByMenuId(
menuId,
menuOrderingSettings,
options,
) {
try {
const result =
await menuOrderingSettings.upsertMenuOrderingSettingsByMenuId(
menuId,
menuOrderingSettings,
options,
);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.