Search.../

deleteCheckoutTemplate( )

Developer Preview

Deletes a checkout template.

Description

If a checkout template is deleted and a customer attempts to create a checkout with that checkoutTemplateId then the customer will be redirected to the domain site.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function deleteCheckoutTemplate(checkoutTemplateId: string): Promise<void>

deleteCheckoutTemplate Parameters

NAME
TYPE
DESCRIPTION
checkoutTemplateId
string

ID of the checkout template to delete.

Returns

Return Type:

Promise<
void
>

Was this helpful?

deleteCheckoutTemplate example

Copy Code
1import { checkoutTemplates } from 'wix-ecom-backend';
2
3 async function deleteCheckoutTemplate(checkoutTemplateId) {
4 try {
5 const result = await checkoutTemplates.deleteCheckoutTemplate(checkoutTemplateId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13