Skip to content

addFee mutation doesn't add the extra fee to the cart summary #477

@aresrioja10

Description

@aresrioja10

Describe the bug
I'm trying to use the addFee mutation in order to add extra fees in the checkout page when a user select some optional services. The problem is that it doesn't add the fee to the cart.

To Reproduce
Steps to reproduce the behavior:

  1. Execute the following mutation (i'm using the GraphQL IDE):
mutation addFee {
  addFee(input: {name: "Extra service", amount: 1.5}) {
    clientMutationId
    cart {
      fees {
        name
        amount
      }
    }
  }
}

Expected behavior
Although the mutation result returns this:

"data": {
    "addFee": {
      "clientMutationId": null,
      "cart": {
        "fees": [
          {
            "name": "Extra service",
            "amount": 1.5
          }
        ]
      }
    }
  }

if I visit the cart page I can't see the fees being applied:

Captura de pantalla 2021-04-18 a las 12 37 53

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome

Plugin Versions

  • WooGraphQL Version: 0.8.1
  • WPGraphQL Version: 1.3.5
  • WordPress Version: 5.7.1
  • WooCommerce Version: 5.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions