@easy-cms/plugin-ecommerce 0.66.1 → 0.67.1

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.
@@ -783,7 +783,7 @@ var INFO = {
783
783
  name: "@easy-cms/plugin-ecommerce",
784
784
  // The plugin API it is written for (`PLUGIN_API_VERSION` of @easy-cms/core).
785
785
  apiVersion: 1,
786
- ...true ? { version: "0.66.1" } : {}
786
+ ...true ? { version: "0.67.1" } : {}
787
787
  };
788
788
 
789
789
  // src/shop.ts
@@ -1694,15 +1694,23 @@ function ecommercePlugin(options) {
1694
1694
  return found;
1695
1695
  };
1696
1696
  const who = (req) => ({ user: req.user, context: req.context });
1697
- const settings = () => ({
1697
+ const settings = (locale) => ({
1698
1698
  currencies,
1699
1699
  defaultCurrency,
1700
- paymentMethods: [...methods.values()].map((m) => ({ name: m.name, label: labelText(m.label) })),
1700
+ // Labels in the page's language (`?locale=`), as the order emails use the order's.
1701
+ paymentMethods: [...methods.values()].map((m) => ({
1702
+ name: m.name,
1703
+ label: labelText(m.label, locale)
1704
+ })),
1701
1705
  guests: shop.guests,
1702
1706
  countries
1703
1707
  });
1704
1708
  const endpoints = [
1705
- { path: "/shop/config", method: "get", handler: () => settings() },
1709
+ {
1710
+ path: "/shop/config",
1711
+ method: "get",
1712
+ handler: ({ url }) => settings(url.searchParams.get("locale") ?? void 0)
1713
+ },
1706
1714
  {
1707
1715
  path: "/shop/cart",
1708
1716
  method: "post",
@@ -147,7 +147,7 @@ function createShopClient(options = {}) {
147
147
  async load() {
148
148
  try {
149
149
  const [settings, user] = await Promise.all([
150
- call("GET", "/shop/config"),
150
+ call("GET", `/shop/config?locale=${encodeURIComponent(locale)}`),
151
151
  me().catch(() => null)
152
152
  ]);
153
153
  set({ settings, user });
package/dist/client.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  createShopClient,
7
7
  formatPrice,
8
8
  priceField
9
- } from "./chunk-4DBRFOY7.js";
9
+ } from "./chunk-PXMODGBG.js";
10
10
  export {
11
11
  CURRENCIES,
12
12
  ORDER_STATUSES,
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  paymentSucceeded,
13
13
  price,
14
14
  priceField
15
- } from "./chunk-3Y5AT4WN.js";
15
+ } from "./chunk-AWRN73SK.js";
16
16
 
17
17
  // src/payments.ts
18
18
  var definePaymentAdapter = (adapter) => adapter;
package/dist/react.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  createShopClient,
7
7
  formatPrice,
8
8
  priceField
9
- } from "./chunk-4DBRFOY7.js";
9
+ } from "./chunk-PXMODGBG.js";
10
10
 
11
11
  // src/react.ts
12
12
  import {
package/dist/stripe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paymentFailed,
3
3
  paymentSucceeded
4
- } from "./chunk-3Y5AT4WN.js";
4
+ } from "./chunk-AWRN73SK.js";
5
5
 
6
6
  // src/stripe.ts
7
7
  function stripeAdapter(options) {
package/dist/vue.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  createShopClient,
7
7
  formatPrice,
8
8
  priceField
9
- } from "./chunk-4DBRFOY7.js";
9
+ } from "./chunk-PXMODGBG.js";
10
10
 
11
11
  // src/vue.ts
12
12
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/plugin-ecommerce",
3
- "version": "0.66.1",
3
+ "version": "0.67.1",
4
4
  "description": "A shop for Easy CMS: products and variants, prices in several currencies, carts (guests too), checkout with Stripe or bank transfer, orders, stock, customer accounts, and React and Vue hooks (experimental)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "react": ">=18.0.0",
37
37
  "stripe": ">=17.0.0",
38
38
  "vue": "^3.4.0",
39
- "@easy-cms/core": "^0.66.1"
39
+ "@easy-cms/core": "^0.67.1"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "react": {
@@ -54,9 +54,9 @@
54
54
  "happy-dom": "^20.14.5",
55
55
  "react": "^19.2.0",
56
56
  "vue": "^3.5.43",
57
- "@easy-cms/core": "^0.66.1",
58
- "@easy-cms/db-sqlite": "^0.66.1",
59
- "@easy-cms/plugin-multi-tenant": "^0.66.1"
57
+ "@easy-cms/core": "^0.67.1",
58
+ "@easy-cms/db-sqlite": "^0.67.1",
59
+ "@easy-cms/plugin-multi-tenant": "^0.67.1"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=22.12"