Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / whatsAppContact

Function: whatsAppContact()

whatsAppContact(config, page, words): WhatsAppContact

The store's WhatsApp for one page, or null when it has none: every link a theme draws to it — the launcher, a footer or menu link, a contact card, the order confirmation's button — comes from here, so each carries the page's message and every text is in the page's language.

Each text is the merchant's when they wrote one, else the theme's words. The message is the page's own template (a product's, an order's), else the merchant's general one, else the theme's for that kind of page.

Parameters

config

Pick<StoreConfig, "whatsapp" | "name">

page

WhatsAppPage

words

WhatsAppWords

Returns

WhatsAppContact