@pelcro/react-pelcro-js 3.44.0 → 3.45.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/dist/index.cjs.js CHANGED
@@ -11220,21 +11220,24 @@ const init$1 = () => {
11220
11220
  if (!quickPurchaseItem) {
11221
11221
  return console.error("invalid item SKU id");
11222
11222
  }
11223
- const purchaseResult = purchaseItem(itemSkuId);
11224
- const itemDidntMatchUserCurrency = purchaseResult === false;
11225
- if (itemDidntMatchUserCurrency) {
11226
- var _window$Pelcro$user$r;
11227
- const userCurrency = (_window$Pelcro$user$r = window.Pelcro.user.read().currency) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.toUpperCase();
11228
- const errorMsg = i18next.t("shop:messages.currencyMismatch", {
11229
- currency: userCurrency
11230
- });
11231
- notify$1.error(errorMsg);
11232
- }
11223
+ purchaseItem(itemSkuId);
11224
+
11225
+ // if (itemDidntMatchUserCurrency) {
11226
+ // const userCurrency = window.Pelcro.user
11227
+ // .read()
11228
+ // .currency?.toUpperCase();
11229
+ // const errorMsg = i18n.t(
11230
+ // "shop:messages.currencyMismatch",
11231
+ // { currency: userCurrency }
11232
+ // );
11233
+ // notify.error(errorMsg);
11234
+ // }
11233
11235
  });
11234
11236
  }
11235
11237
  }
11236
11238
  });
11237
11239
  };
11240
+
11238
11241
  const authenticatedButtons = () => {
11239
11242
  saveToMetadataButton.authenticated();
11240
11243
  const pelcroLoginByClass = document.getElementsByClassName("pelcro-login-button");
@@ -27223,23 +27226,21 @@ const CartContainer = _ref => {
27223
27226
  }
27224
27227
  });
27225
27228
  } else {
27226
- const userCurrency = window.Pelcro.user.read().currency;
27227
- const itemsCurrency = cartItems[0].currency;
27228
- if (userCurrency && userCurrency !== itemsCurrency) {
27229
- dispatch({
27230
- type: DISABLE_SUBMIT,
27231
- payload: true
27232
- });
27233
- dispatch({
27234
- type: SHOW_ALERT,
27235
- payload: {
27236
- type: "error",
27237
- content: t("messages.currencyMismatch", {
27238
- currency: userCurrency.toUpperCase()
27239
- })
27240
- }
27241
- });
27242
- }
27229
+ window.Pelcro.user.read().currency;
27230
+ cartItems[0].currency;
27231
+
27232
+ // if (userCurrency && userCurrency !== itemsCurrency) {
27233
+ // dispatch({ type: DISABLE_SUBMIT, payload: true });
27234
+ // dispatch({
27235
+ // type: SHOW_ALERT,
27236
+ // payload: {
27237
+ // type: "error",
27238
+ // content: t("messages.currencyMismatch", {
27239
+ // currency: userCurrency.toUpperCase()
27240
+ // })
27241
+ // }
27242
+ // });
27243
+ // }
27243
27244
  }
27244
27245
  }, [cartItems]);
27245
27246
  const submit = (state, dispatch) => {
package/dist/index.esm.js CHANGED
@@ -11190,21 +11190,24 @@ const init$1 = () => {
11190
11190
  if (!quickPurchaseItem) {
11191
11191
  return console.error("invalid item SKU id");
11192
11192
  }
11193
- const purchaseResult = purchaseItem(itemSkuId);
11194
- const itemDidntMatchUserCurrency = purchaseResult === false;
11195
- if (itemDidntMatchUserCurrency) {
11196
- var _window$Pelcro$user$r;
11197
- const userCurrency = (_window$Pelcro$user$r = window.Pelcro.user.read().currency) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.toUpperCase();
11198
- const errorMsg = i18next.t("shop:messages.currencyMismatch", {
11199
- currency: userCurrency
11200
- });
11201
- notify$1.error(errorMsg);
11202
- }
11193
+ purchaseItem(itemSkuId);
11194
+
11195
+ // if (itemDidntMatchUserCurrency) {
11196
+ // const userCurrency = window.Pelcro.user
11197
+ // .read()
11198
+ // .currency?.toUpperCase();
11199
+ // const errorMsg = i18n.t(
11200
+ // "shop:messages.currencyMismatch",
11201
+ // { currency: userCurrency }
11202
+ // );
11203
+ // notify.error(errorMsg);
11204
+ // }
11203
11205
  });
11204
11206
  }
11205
11207
  }
11206
11208
  });
11207
11209
  };
11210
+
11208
11211
  const authenticatedButtons = () => {
11209
11212
  saveToMetadataButton.authenticated();
11210
11213
  const pelcroLoginByClass = document.getElementsByClassName("pelcro-login-button");
@@ -27193,23 +27196,21 @@ const CartContainer = _ref => {
27193
27196
  }
27194
27197
  });
27195
27198
  } else {
27196
- const userCurrency = window.Pelcro.user.read().currency;
27197
- const itemsCurrency = cartItems[0].currency;
27198
- if (userCurrency && userCurrency !== itemsCurrency) {
27199
- dispatch({
27200
- type: DISABLE_SUBMIT,
27201
- payload: true
27202
- });
27203
- dispatch({
27204
- type: SHOW_ALERT,
27205
- payload: {
27206
- type: "error",
27207
- content: t("messages.currencyMismatch", {
27208
- currency: userCurrency.toUpperCase()
27209
- })
27210
- }
27211
- });
27212
- }
27199
+ window.Pelcro.user.read().currency;
27200
+ cartItems[0].currency;
27201
+
27202
+ // if (userCurrency && userCurrency !== itemsCurrency) {
27203
+ // dispatch({ type: DISABLE_SUBMIT, payload: true });
27204
+ // dispatch({
27205
+ // type: SHOW_ALERT,
27206
+ // payload: {
27207
+ // type: "error",
27208
+ // content: t("messages.currencyMismatch", {
27209
+ // currency: userCurrency.toUpperCase()
27210
+ // })
27211
+ // }
27212
+ // });
27213
+ // }
27213
27214
  }
27214
27215
  }, [cartItems]);
27215
27216
  const submit = (state, dispatch) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.44.0",
4
+ "version": "3.45.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",