commerce-kit 0.67.1 → 0.69.0

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 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
- const subscriber = await commerce.subscriberCreate({ email: 'jane@example.com', marketingConsent: true });
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.