Schema Documentation
Order
Description
A order object
Fields
Field Name | Description |
---|---|
billing -
CustomerAddress | Order billing properties |
cartHash -
String | Cart hash |
cartTax -
String | Cart tax amount |
Arguments
| |
commentCount -
Int | The number of comments. Even though WPGraphQL denotes this field as an integer, in WordPress this field should be saved as a numeric string for compatibility. |
commentStatus -
String | Whether the comments are open or closed for this particular post. |
couponLines -
OrderToCouponLineConnection | Connection between the Order type and the CouponLine type |
Arguments
| |
createdVia -
String | How order was created |
currency -
String | Order currency |
customer -
Customer | Order customer |
customerIpAddress -
String | Customer IP Address |
customerNote -
String | Customer note |
customerUserAgent -
String | Customer User Agent |
databaseId -
Int | The ID of the order in the database |
date -
String | Date order was created |
dateCompleted -
String | Date order was completed |
datePaid -
String | Date order was paid |
discountTax -
String | Discount tax amount |
Arguments
| |
discountTotal -
String | Discount total amount |
Arguments
| |
downloadableItems -
OrderToDownloadableItemConnection | Connection between the Order type and the DownloadableItem type |
Arguments
| |
feeLines -
OrderToFeeLineConnection | Connection between the Order type and the FeeLine type |
Arguments
| |
hasBillingAddress -
Boolean | Order has a billing address? |
hasDownloadableItem -
Boolean | If order contains a downloadable product |
hasShippingAddress -
Boolean | Order has a shipping address? |
id -
ID! | The globally unique identifier for the order |
isDownloadPermitted -
Boolean | Is product download is permitted |
lineItems -
OrderToLineItemConnection | Connection between the Order type and the LineItem type |
Arguments
| |
metaData -
[MetaData] | Object meta data |
modified -
String | Date order was last updated |
needsPayment -
Boolean | If order needs payment |
needsProcessing -
Boolean | If order needs processing before it can be completed |
needsShippingAddress -
Boolean | If order needs shipping address |
orderKey -
String | Order key |
orderNotes -
OrderToCommentConnection | Connection between the Order type and the Comment type |
Arguments
| |
orderNumber -
String | Order number |
orderVersion -
String | Order version |
parent -
Order | Parent order |
paymentMethod -
String | Payment method |
paymentMethodTitle -
String | Payment method title |
pricesIncludeTax -
Boolean | Prices include taxes? |
refunds -
OrderToRefundConnection | Connection between the Order type and the Refund type |
Arguments
| |
shipping -
CustomerAddress | Order shipping properties |
shippingAddressMapUrl -
String | Order customer |
shippingLines -
OrderToShippingLineConnection | Connection between the Order type and the ShippingLine type |
Arguments
| |
shippingTax -
String | Shipping tax amount |
Arguments
| |
shippingTotal -
String | Shipping total amount |
Arguments
| |
status -
OrderStatusEnum | Order status |
subtotal -
String | Order subtotal |
Arguments
| |
taxLines -
OrderToTaxLineConnection | Connection between the Order type and the TaxLine type |
Arguments
| |
total -
String | Order grand total |
Arguments
| |
totalTax -
String | Order taxes |
Arguments
| |
transactionId -
String | Transaction ID |
Example
{"billing":CustomerAddress,"cartHash":"abc123","cartTax":"xyz789","commentCount":123,"commentStatus":"xyz789","couponLines":OrderToCouponLineConnection,"createdVia":"abc123","currency":"xyz789","customer":Customer,"customerIpAddress":"abc123","customerNote":"abc123","customerUserAgent":"abc123","databaseId":123,"date":"xyz789","dateCompleted":"xyz789","datePaid":"abc123","discountTax":"xyz789","discountTotal":"xyz789","downloadableItems":OrderToDownloadableItemConnection,"feeLines":OrderToFeeLineConnection,"hasBillingAddress":false,"hasDownloadableItem":true,"hasShippingAddress":false,"id":4,"isDownloadPermitted":false,"lineItems":OrderToLineItemConnection,"metaData":[MetaData],"modified":"abc123","needsPayment":false,"needsProcessing":true,"needsShippingAddress":false,"orderKey":"abc123","orderNotes":OrderToCommentConnection,"orderNumber":"xyz789","orderVersion":"abc123","parent":Order,"paymentMethod":"abc123","paymentMethodTitle":"abc123","pricesIncludeTax":true,"refunds":OrderToRefundConnection,"shipping":CustomerAddress,"shippingAddressMapUrl":"xyz789","shippingLines":OrderToShippingLineConnection,"shippingTax":"xyz789","shippingTotal":"xyz789","status":"CANCELLED","subtotal":"abc123","taxLines":OrderToTaxLineConnection,"total":"abc123","totalTax":"xyz789","transactionId":"abc123"}