Skip to content

mutations return cartItem total excluding tax, even if the settings in WP are different #405

@MobyDigg

Description

@MobyDigg

Describe the bug
The addToCart mutation (and all others too) returns the total price of an cartItem always excluding the respective taxes. Therefore the value is always equal to subtotal

To Reproduce

mutation test {
  addToCart(input: {productId: ID!, variationId: ID!}) {
    cartItem {
      subtotal
      subtotalTax
      tax
    }
  }
}

returns in my case:

"data": {
    "addToCart": {
      "cartItem": {
        "subtotal": "172€",
        "subtotalTax": "27€",
        "tax": "27€",
        "total": "172€",
        "quantity": 1,
        "key": "e387168c9b6c258ba35c924e9710c903"
      }
    }
  },

Expected behavior
If you set the setting in WooCommerce to true, that prices are shown including taxes, total should return the added value of subtotal + subtotalTax.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions