> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: updateCheckoutSettings(checkoutSettings: CheckoutSettings, options: UpdateCheckoutSettingsOptions) # Method package: wixEcomBackend # Method menu location: wixEcomBackend --> checkoutSettings --> updateCheckoutSettings # Method Link: https://dev.wix.com/docs/velo/apis/wix-ecom-backend/checkout-settings/update-checkout-settings.md # Method Description: Updates the sites' checkout settings. The `updateCheckoutSettings()` function returns a Promise that resolves to the newly updated checkout settings. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Update checkout settings (dashboard page code) ```javascript import { checkoutSettings } from 'wix-ecom-backend'; /* Sample update value: { "checkoutSettingsInfo": { "checkoutFields": { "mitEnabled": false } } } */ export async function myUpdateCheckoutSettingsFunction(checkoutSettingsInfo) { try { const settings = await checkoutSettings.updateCheckoutSettings(checkoutSettingsInfo); console.log('Success! Updated checkout settings:', settings); return settings; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: { "checkoutSettings": { "checkoutPolicies": { "termsAndConditions": { "visible": true, "content": "All product listings, prices, and specifications are subject to change without notice. ACCS reserves the right to modify or discontinue products at any time." }, "privacyPolicy": { "visible": true, "content": "Your privacy is important to us. Please review our Privacy Policy to understand how we collect, use, and disclose information." }, "returnPolicy": { "visible": true, "content": "Please refer to our Return Policy page for information on returns and refunds. ACCS reserves the right to refuse returns that do not meet our policy criteria." }, "digitalItemPolicy": { "visible": false, "content": "" }, "contactUs": { "visible": true, "content": "Email: accs@mail.com" }, "customPolicy": { "visible": true, "content": "Placing an order on our website constitutes an offer to purchase the products. We reserve the right to refuse or cancel any order for any reason. Payment must be received before order processing.", "title": "Orders and Payments" } }, "checkoutFields": { "subscriptionCheckbox": { "visible": true, "checkedByDefault": false }, "policyAgreementCheckbox": { "visible": true, "checkedByDefault": false }, "giftCardRedeemEnabled": true, "mitEnabled": false } } } */ ``` ## Update checkout settings (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { checkoutSettings } from 'wix-ecom-backend'; import { elevate } from 'wix-auth'; /* Sample update value: { "checkoutSettingsInfo": { "checkoutFields": { "mitEnabled": false } } } */ export const myUpdateCheckoutSettingsFunction = webMethod(Permissions.Admin, async (checkoutSettingsInfo) => { try { const elevatedUpdateCheckoutSettings = elevate(checkoutSettings.updateCheckoutSettings); const settings = await elevatedUpdateCheckoutSettings(checkoutSettingsInfo); console.log('Success! Updated checkout settings:', settings); return settings; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: { "checkoutSettings": { "checkoutPolicies": { "termsAndConditions": { "visible": true, "content": "All product listings, prices, and specifications are subject to change without notice. ACCS reserves the right to modify or discontinue products at any time." }, "privacyPolicy": { "visible": true, "content": "Your privacy is important to us. Please review our Privacy Policy to understand how we collect, use, and disclose information." }, "returnPolicy": { "visible": true, "content": "Please refer to our Return Policy page for information on returns and refunds. ACCS reserves the right to refuse returns that do not meet our policy criteria." }, "digitalItemPolicy": { "visible": false, "content": "" }, "contactUs": { "visible": true, "content": "Email: accs@mail.com" }, "customPolicy": { "visible": true, "content": "Placing an order on our website constitutes an offer to purchase the products. We reserve the right to refuse or cancel any order for any reason. Payment must be received before order processing.", "title": "Orders and Payments" } }, "checkoutFields": { "subscriptionCheckbox": { "visible": true, "checkedByDefault": false }, "policyAgreementCheckbox": { "visible": true, "checkedByDefault": false }, "giftCardRedeemEnabled": true, "mitEnabled": false } } } */ ``` ---