diff --git a/blocks/subscriptions-block/components/Cart/index.jsx b/blocks/subscriptions-block/components/Cart/index.jsx index f58f5973a3..a5a92325e7 100644 --- a/blocks/subscriptions-block/components/Cart/index.jsx +++ b/blocks/subscriptions-block/components/Cart/index.jsx @@ -11,8 +11,8 @@ const getPaymentInfo = ({ origin, endpoint, priceCode }) => { const dateMidnight = new Date(); dateMidnight.setUTCHours(0, 0, 0, 0); - return fetch(`${origin}${endpoint}${priceCode}/1/${dateMidnight}`, {}).then((res) => - res.json(), + return fetch(`${origin}${endpoint}${priceCode}/1/${dateMidnight.getTime()}`, {}).then((res) => + res.json() ); }; @@ -51,8 +51,8 @@ const Cart = ({ offerURL, className }) => { fetchPaymentInfo(item.priceCode).then((priceSummary) => ({ ...item, priceSummary, - })), - ), + })) + ) ).then((results) => { updatedCart.items = results; }); @@ -64,7 +64,7 @@ const Cart = ({ offerURL, className }) => { setCartItems( await Sales.getCart() .then(fetchCartItemSummaries) - .catch(() => []), + .catch(() => []) ); setIsFetching(false); };