Skip to content

Commit

Permalink
Merge pull request #915 from w3bdesign/develop
Browse files Browse the repository at this point in the history
1.0.6
  • Loading branch information
w3bdesign authored Oct 11, 2022
2 parents c723eea + 752bb64 commit cd6b9ef
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 168 deletions.
8 changes: 4 additions & 4 deletions components/Cart/AddToCartButton.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ const AddToCartButton = ({ product }) => {
input: productQueryInput,
},
onCompleted: () => {
console.log("Completed")
// Update the cart with new values in React context.
refetch();
console.log('Completed');
// Update the cart with new values in React context.
refetch();
// If error.
if (addToCartError) {
setRequestError(addToCartError.graphQLErrors[0].message);
}

// Show View Cart Button
setShowViewCart(true);
setshowAddToCart(true);
Expand Down
2 changes: 1 addition & 1 deletion components/Cart/CartPage/CartItemsContainer.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const CartItemsContainer = () => {
notifyOnNetworkStatusChange: true,
onCompleted: () => {
refetch();

// Update cart in the localStorage.
const updatedCart = getFormattedCart(data);
localStorage.setItem('woocommerce-cart', JSON.stringify(updatedCart));
Expand Down
Loading

1 comment on commit cd6b9ef

@vercel
Copy link

@vercel vercel bot commented on cd6b9ef Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.