@anker-in/shopify-react 0.1.1-beta.16 → 0.1.1-beta.18
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/hooks/index.js +30 -9
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +30 -9
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.js +30 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -9
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.js +22 -1
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +22 -1
- package/dist/provider/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1506,8 +1506,29 @@ var useCartAttributes = ({
|
|
|
1506
1506
|
[memberAttributes, functionAttributes, presellAttributes, weightAttributes, trackingAttributes]
|
|
1507
1507
|
);
|
|
1508
1508
|
const extraAttributesInCart = useMemo(() => {
|
|
1509
|
+
const commonAttributeKeys = [
|
|
1510
|
+
// member attributes
|
|
1511
|
+
"_token",
|
|
1512
|
+
"_member_type",
|
|
1513
|
+
"_user_type",
|
|
1514
|
+
"_is_login",
|
|
1515
|
+
"_login_user",
|
|
1516
|
+
// function attributes
|
|
1517
|
+
"_discounts_function_env",
|
|
1518
|
+
// presell attributes
|
|
1519
|
+
"_presale",
|
|
1520
|
+
// weight attributes
|
|
1521
|
+
"_weight",
|
|
1522
|
+
"_app_source_name",
|
|
1523
|
+
// tracking attributes
|
|
1524
|
+
"utm_params",
|
|
1525
|
+
// referral attributes
|
|
1526
|
+
"_invite_code",
|
|
1527
|
+
"_play_mode_id",
|
|
1528
|
+
"_popup"
|
|
1529
|
+
];
|
|
1509
1530
|
return cart?.customAttributes?.filter(
|
|
1510
|
-
(item) => !
|
|
1531
|
+
(item) => !commonAttributeKeys.includes(item.key)
|
|
1511
1532
|
) || [];
|
|
1512
1533
|
}, [cart]);
|
|
1513
1534
|
return useMemo(
|
|
@@ -2722,13 +2743,7 @@ var usePlusMemberItemCustomAttributes = ({
|
|
|
2722
2743
|
}) => {
|
|
2723
2744
|
const { deliveryCustomData } = deliveryData || {};
|
|
2724
2745
|
return useMemo(() => {
|
|
2725
|
-
const itemCustomAttributes = [
|
|
2726
|
-
// _last_url: 付费会员结算完成之后 checkout 有一个继续购买的按钮, 用于跳转到继续购买的页面
|
|
2727
|
-
{
|
|
2728
|
-
key: "_last_url",
|
|
2729
|
-
value: typeof window !== "undefined" ? window.location.origin + window.location.pathname : ""
|
|
2730
|
-
}
|
|
2731
|
-
];
|
|
2746
|
+
const itemCustomAttributes = [];
|
|
2732
2747
|
if (deliveryCustomData?.is_presale) {
|
|
2733
2748
|
itemCustomAttributes.push({
|
|
2734
2749
|
key: "_is_presale",
|
|
@@ -2747,7 +2762,13 @@ var usePlusMemberCheckoutCustomAttributes = ({
|
|
|
2747
2762
|
const { deliveryCustomData } = deliveryData || {};
|
|
2748
2763
|
const { profile } = usePlusMemberContext();
|
|
2749
2764
|
return useMemo(() => {
|
|
2750
|
-
const checkoutCustomAttributes = [
|
|
2765
|
+
const checkoutCustomAttributes = [
|
|
2766
|
+
// _last_url: 付费会员结算完成之后 checkout 有一个继续购买的按钮, 用于跳转到继续购买的页面
|
|
2767
|
+
{
|
|
2768
|
+
key: "_last_url",
|
|
2769
|
+
value: typeof window !== "undefined" ? window.location.origin + window.location.pathname : ""
|
|
2770
|
+
}
|
|
2771
|
+
];
|
|
2751
2772
|
if (deliveryCustomData) {
|
|
2752
2773
|
checkoutCustomAttributes.push({
|
|
2753
2774
|
key: "_checkout_delivery_custom",
|