Skip to content

Variant products added to cart #415

Closed
@etoler1841

Description

@etoler1841

Describe the bug
When a product variant is added to the cart, all other products in the cart are removed. When a variant is already in the cart, adding any other product removes the variant.

To Reproduce

  1. Add a simple product to the cart.
  2. Add a product variant to the cart. The simple product will disappear.
  3. Add any number of simple products to the cart. The variable product will disappear, but all simple products will exist.

Note: This error does not occur if using GraphiQL from the WordPress dashboard. Instead, send the queries from a client application, Postman, or some other external source.

Expected behavior
All products should be added to the cart without affecting other products.

Desktop:

  • OS: Windows
  • Browser: Firefox
  • Version: 83.0

Additional context
This issue doesn't happen when using the built-in GraphiQL interface. However, this may be because, since it's embedded in WordPress, vanilla WooCommerce is able to manage the cart directly and it overwrites whatever error is occurring when using GraphQL externally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions