Sets the list of currencies that the site will support.
The setCurrencies()
function sets the list of currencies that you want your site to support. This is a subset of the list of currencies supported by Wix as returned by getAllCurrencies()
. The currencies set will be displayed in the currency conversion dropdown element. Selecting a currency from the dropdown on a store page will display the prices in the selected currency.
function setCurrencies(options: Array<CurrencyCode>): Promise<void>;
Currencies to be supported by the site.
Note: For SiteSettings functions to work, your site must contain a Wix Stores page including the currency conversion element.
The currency codes used must exist in the array returned by the getAllCurrencies()
function.
import { currencies } from "wix-pay-backend";
currencies.siteSettings
.setCurrencies([{ code: "USD" }, { code: "BRL" }, { code: "JPY" }])
.then(console.log("currencies set"));
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.