commerce-kit 0.67.2 → 0.69.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/api-types.d.ts +426 -68
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,6 +110,10 @@ const cart = await commerce.cartUpsert({
|
|
|
110
110
|
cartId: 'cart_123', // optional, creates new if omitted
|
|
111
111
|
variantId: 'variant_456',
|
|
112
112
|
quantity: 2,
|
|
113
|
+
// The storefront language the shopper is browsing in (the store's default or an enabled
|
|
114
|
+
// language). Kept on the cart and copied to the order, so checkout, the payment form and
|
|
115
|
+
// every email about the order speak it. Send it on every add; the last value wins.
|
|
116
|
+
locale: 'pl-PL',
|
|
113
117
|
});
|
|
114
118
|
|
|
115
119
|
// Get cart
|
|
@@ -229,7 +233,8 @@ const ticket = await commerce.ticketAttendeeGet({ token: 'a1b2c3...' });
|
|
|
229
233
|
## Newsletter
|
|
230
234
|
|
|
231
235
|
```typescript
|
|
232
|
-
|
|
236
|
+
// `locale` is the language of the signup form: the confirmation and welcome emails are sent in it.
|
|
237
|
+
const subscriber = await commerce.subscriberCreate({ email: 'jane@example.com', marketingConsent: true, locale: 'pl-PL' });
|
|
233
238
|
|
|
234
239
|
// Double opt-in stores return pending: true — the address joins the list only after the
|
|
235
240
|
// shopper clicks the link in the confirmation email. Tell them to check their inbox.
|