Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fillCart doesn't report the coupon errors #458

Open
aresrioja10 opened this issue Mar 23, 2021 · 0 comments
Open

fillCart doesn't report the coupon errors #458

aresrioja10 opened this issue Mar 23, 2021 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@aresrioja10
Copy link

Describe the bug
I'm trying to execute the fillCart mutation with one invalid coupon code and it doesn't return the errors.

To Reproduce
Execute the following mutation. In my case, I've created a coupon "somecode" with a minimum price of 500€. The product with the ID 2610 costs 366,12€ so the coupon is invalid in that case.

mutation fillCart {
  fillCart(input: {items: {productId: 2610, variationId: 4833, quantity: 1}, coupons: ["somecode"]}) {
    added {
      subtotal
      quantity
      product {
        node {
          databaseId
        }
      }
    }
    applied {
      code
      discountAmount
      discountTax
    }
    cartErrors {
      reasons
      ... on CouponError {
        reasons
      }
    }
  }
}

Expected behavior
It should fill the cartErrors field with the error message. Instead, it returns the following response:

"data": {
    "fillCart": {
      "added": [
        {
          "subtotal": "366,12 €",
          "quantity": 1,
          "product": {
            "node": {
              "databaseId": 2610
            }
          }
        }
      ],
      "applied": null,
      "cartErrors": []
    }
  }

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome

Plugin Versions

  • WooGraphQL Version: 0.8.1
  • WPGraphQL Version: 1.3.2
  • **WordPress Version: 5.7
  • **WooCommerce Version: 5.1.0
@kidunot89 kidunot89 added the bug Something isn't working label Apr 5, 2021
@kidunot89 kidunot89 added this to the v0.11.0 milestone Feb 2, 2022
@kidunot89 kidunot89 modified the milestones: v0.19.0, v0.20.0 Dec 27, 2023
@kidunot89 kidunot89 modified the milestones: v0.21.0, v0.22.0 Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants