@anker-in/shopify-react 1.0.0 → 1.0.1-beta.1

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.js CHANGED
@@ -810,14 +810,15 @@ function useAddCartLines(options) {
810
810
  const { mutateCart, metafieldIdentifiers } = useCartContext();
811
811
  const addLines = react.useCallback(
812
812
  async (_key, { arg }) => {
813
- const { cartId, lines } = arg;
813
+ const { cartId, lines, updateCookie = true } = arg;
814
814
  const id = cartId || cartCookieAdapter?.getCartId(locale);
815
815
  let updatedCart;
816
816
  if (!id) {
817
817
  updatedCart = await shopifySdk.createCart(client, {
818
818
  lines,
819
819
  metafieldIdentifiers,
820
- cookieAdapter: cartCookieAdapter
820
+ cookieAdapter: cartCookieAdapter,
821
+ updateCookie
821
822
  });
822
823
  } else {
823
824
  updatedCart = await shopifySdk.addCartLines(client, {