Issue with useCartSubscription Hook Not Detecting Cart Item Removal in Shopify POS on cart screen

Hi, I’m using the POS extension version 9.30.1, and I came across a weird issue.

I’m using the useCartSubscription hook to listen for cart changes. However, the effect is not triggered when I remove a product from the cart screen.

Is there any other way to listen for cart item changes? The cart screen is handled by Shopify.

For reference, I’m attaching screenshots.

const cart = useCartSubscription();

useEffect(() => {
  console.log("Line item changed");
}, [cart.lineItems]);

//Cart screen

Hi @Hassan_Ahmed There was a recent issue around the cart subscription on first load. There is a fix available in POS 9.31.0 which you can download starting March 31.

Thank you
Victor

1 Like

Thanks @Victor_Chu , i will update this.