@pelcro/react-pelcro-js 3.26.0-beta.73 → 3.26.0-beta.74

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
@@ -11728,21 +11728,24 @@ const init$1 = () => {
11728
11728
  if (!quickPurchaseItem) {
11729
11729
  return console.error("invalid item SKU id");
11730
11730
  }
11731
- const purchaseResult = purchaseItem(itemSkuId);
11732
- const itemDidntMatchUserCurrency = purchaseResult === false;
11733
- if (itemDidntMatchUserCurrency) {
11734
- var _window$Pelcro$user$r;
11735
- 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();
11736
- const errorMsg = i18next.t("shop:messages.currencyMismatch", {
11737
- currency: userCurrency
11738
- });
11739
- notify.error(errorMsg);
11740
- }
11731
+ purchaseItem(itemSkuId);
11732
+
11733
+ // if (itemDidntMatchUserCurrency) {
11734
+ // const userCurrency = window.Pelcro.user
11735
+ // .read()
11736
+ // .currency?.toUpperCase();
11737
+ // const errorMsg = i18n.t(
11738
+ // "shop:messages.currencyMismatch",
11739
+ // { currency: userCurrency }
11740
+ // );
11741
+ // notify.error(errorMsg);
11742
+ // }
11741
11743
  });
11742
11744
  }
11743
11745
  }
11744
11746
  });
11745
11747
  };
11748
+
11746
11749
  const authenticatedButtons = () => {
11747
11750
  saveToMetadataButton.authenticated();
11748
11751
  const pelcroLoginByClass = document.getElementsByClassName("pelcro-login-button");
@@ -28837,23 +28840,21 @@ const CartContainer = _ref => {
28837
28840
  }
28838
28841
  });
28839
28842
  } else {
28840
- const userCurrency = window.Pelcro.user.read().currency;
28841
- const itemsCurrency = cartItems[0].currency;
28842
- if (userCurrency && userCurrency !== itemsCurrency) {
28843
- dispatch({
28844
- type: DISABLE_SUBMIT,
28845
- payload: true
28846
- });
28847
- dispatch({
28848
- type: SHOW_ALERT,
28849
- payload: {
28850
- type: "error",
28851
- content: t("messages.currencyMismatch", {
28852
- currency: userCurrency.toUpperCase()
28853
- })
28854
- }
28855
- });
28856
- }
28843
+ window.Pelcro.user.read().currency;
28844
+ cartItems[0].currency;
28845
+
28846
+ // if (userCurrency && userCurrency !== itemsCurrency) {
28847
+ // dispatch({ type: DISABLE_SUBMIT, payload: true });
28848
+ // dispatch({
28849
+ // type: SHOW_ALERT,
28850
+ // payload: {
28851
+ // type: "error",
28852
+ // content: t("messages.currencyMismatch", {
28853
+ // currency: userCurrency.toUpperCase()
28854
+ // })
28855
+ // }
28856
+ // });
28857
+ // }
28857
28858
  }
28858
28859
  }, [cartItems]);
28859
28860
  const submit = (state, dispatch) => {
package/dist/index.esm.js CHANGED
@@ -11698,21 +11698,24 @@ const init$1 = () => {
11698
11698
  if (!quickPurchaseItem) {
11699
11699
  return console.error("invalid item SKU id");
11700
11700
  }
11701
- const purchaseResult = purchaseItem(itemSkuId);
11702
- const itemDidntMatchUserCurrency = purchaseResult === false;
11703
- if (itemDidntMatchUserCurrency) {
11704
- var _window$Pelcro$user$r;
11705
- 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();
11706
- const errorMsg = i18next.t("shop:messages.currencyMismatch", {
11707
- currency: userCurrency
11708
- });
11709
- notify.error(errorMsg);
11710
- }
11701
+ purchaseItem(itemSkuId);
11702
+
11703
+ // if (itemDidntMatchUserCurrency) {
11704
+ // const userCurrency = window.Pelcro.user
11705
+ // .read()
11706
+ // .currency?.toUpperCase();
11707
+ // const errorMsg = i18n.t(
11708
+ // "shop:messages.currencyMismatch",
11709
+ // { currency: userCurrency }
11710
+ // );
11711
+ // notify.error(errorMsg);
11712
+ // }
11711
11713
  });
11712
11714
  }
11713
11715
  }
11714
11716
  });
11715
11717
  };
11718
+
11716
11719
  const authenticatedButtons = () => {
11717
11720
  saveToMetadataButton.authenticated();
11718
11721
  const pelcroLoginByClass = document.getElementsByClassName("pelcro-login-button");
@@ -28807,23 +28810,21 @@ const CartContainer = _ref => {
28807
28810
  }
28808
28811
  });
28809
28812
  } else {
28810
- const userCurrency = window.Pelcro.user.read().currency;
28811
- const itemsCurrency = cartItems[0].currency;
28812
- if (userCurrency && userCurrency !== itemsCurrency) {
28813
- dispatch({
28814
- type: DISABLE_SUBMIT,
28815
- payload: true
28816
- });
28817
- dispatch({
28818
- type: SHOW_ALERT,
28819
- payload: {
28820
- type: "error",
28821
- content: t("messages.currencyMismatch", {
28822
- currency: userCurrency.toUpperCase()
28823
- })
28824
- }
28825
- });
28826
- }
28813
+ window.Pelcro.user.read().currency;
28814
+ cartItems[0].currency;
28815
+
28816
+ // if (userCurrency && userCurrency !== itemsCurrency) {
28817
+ // dispatch({ type: DISABLE_SUBMIT, payload: true });
28818
+ // dispatch({
28819
+ // type: SHOW_ALERT,
28820
+ // payload: {
28821
+ // type: "error",
28822
+ // content: t("messages.currencyMismatch", {
28823
+ // currency: userCurrency.toUpperCase()
28824
+ // })
28825
+ // }
28826
+ // });
28827
+ // }
28827
28828
  }
28828
28829
  }, [cartItems]);
28829
28830
  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.26.0-beta.73",
4
+ "version": "3.26.0-beta.74",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",