Last updated

getOrFetchSettings()

Gets settings from cache, or fetches from API if not cached.

Signature

const settings = await window.FairShareSDK.getOrFetchSettings();

Returns

Promise<Settings> — Settings object.

Example

// Get settings (from cache if available, otherwise fetch)
const settings = await window.FairShareSDK.getOrFetchSettings();

console.log('Shop:', settings.shop.name);