Describe the bug
I'm experiencing the following issues when it comes to input variables on the checkout mutation.
shipping / billing address objects appear to be saved to the customer's file in WooCommerce when overwrite is unspecified, and even when overwrite: false is explicitly specified as an input variable.
company input string is not saved to the order even if it's specified as an input variable.
customer notes appears to be a field accessible in the WC backend that has no corresponding front end input value. It is accessible when you edit the shipping address on the order (pen icon).
To Reproduce
Steps to reproduce the behavior:
checkout mutation with overwrite: false, overwrite: null or simply excluding overwrite altogether from the mutation. Upon checking the customer in wp-admin, the address has been overwritten by the one used in the last checkout mutation.mutation CHECKOUT {
checkout(input: {
clientMutationId: "some-unique-id",
shipping: {address1: "234 Placeholder Drive", overwrite: false},
billing: {address1: "123 New Address Street"}}) {
clientMutationId
...
}
}
In either case, the address1 value is updated on the user's file.
checkout mutation with company: "string" as an input variable in either shipping, billing, or both address objects. Upon checking the order in wp-admin, the address does not contain the company name specified during the checkout mutation. mutation CHECKOUT {
checkout(input: {
clientMutationId: "some-unique-id",
shipping: {company: "ACME Inc"},
billing: {company: "ACME Inc"}}) {
clientMutationId
...
}
}
Expected behavior
shipping and billing address objects ought to respect the overwrite flag.
company ought to be written to the order.
Ought to be able to add a customer note as an input variable when creating a checkout mutation.
Additional context
wp-graphql 0.6.0
wp-graphql-woocommerce 0.4.2
I can test this on latest versions of each, but I scanned the open issues and did not see anything related to fixes around these bugs. Let me know, thanks!
@ardiewen The customerNote field was simply forgotten :man_facepalming: I've remedied these bugs here, and the changes will be included the upcoming v0.5.1 release.
Most helpful comment
@ardiewen The
customerNotefield was simply forgotten :man_facepalming: I've remedied these bugs here, and the changes will be included the upcoming v0.5.1 release.