Updates the site's loyalty program.
The updateLoyaltyProgram()
function returns a Promise that resolves when the loyalty program is updated.
With the updateLoyaltyProgram()
function you can update the name of the loyalty program and the details of the collectible points unit. To activate the loyalty program use the activateLoyaltyProgram()
function.
Note: Only visitors with Manage Loyalty permissions can update a loyalty program. You can override the permissions with the wix-auth
elevate()
function.
You can only call this method when authenticated as a Wix app or Wix user identity.
function updateLoyaltyProgram(
loyaltyProgram: LoyaltyProgram,
): Promise<UpdateLoyaltyProgramResponse>;
Loyalty program fields to update.
import { programs } from "@wix/loyalty";
async function updateLoyaltyProgram(loyaltyProgram) {
const response = await programs.updateLoyaltyProgram(loyaltyProgram);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.