@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 +28 -27
- package/dist/index.esm.js +28 -27
- package/package.json +1 -1
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
|
-
|
|
11732
|
-
|
|
11733
|
-
if (itemDidntMatchUserCurrency) {
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
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
|
-
|
|
28841
|
-
|
|
28842
|
-
|
|
28843
|
-
|
|
28844
|
-
|
|
28845
|
-
|
|
28846
|
-
|
|
28847
|
-
|
|
28848
|
-
|
|
28849
|
-
|
|
28850
|
-
|
|
28851
|
-
|
|
28852
|
-
|
|
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
|
-
|
|
11702
|
-
|
|
11703
|
-
if (itemDidntMatchUserCurrency) {
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
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
|
-
|
|
28811
|
-
|
|
28812
|
-
|
|
28813
|
-
|
|
28814
|
-
|
|
28815
|
-
|
|
28816
|
-
|
|
28817
|
-
|
|
28818
|
-
|
|
28819
|
-
|
|
28820
|
-
|
|
28821
|
-
|
|
28822
|
-
|
|
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) => {
|