Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save john-raymon/cea92ff31dc2fe44aecf2c787ede6db6 to your computer and use it in GitHub Desktop.
Save john-raymon/cea92ff31dc2fe44aecf2c787ede6db6 to your computer and use it in GitHub Desktop.
RemoveProductFromCart Commerce.js
removeProductFromCart(lineItemId) {
this.props.commerce.Cart.remove(lineItemId, (resp) => {
// if successful update Cart
if (!resp.error) {
this.setState({
cart: resp.cart
})
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment