Schema Documentation

order

Description

A order object

Response

Returns an Order

Arguments
NameDescription
id - ID The ID for identifying the order
idType - OrderIdTypeEnum Type of ID being used identify order

Example

Query
query order(  $id: ID,  $idType: OrderIdTypeEnum){  order(    id: $id,    idType: $idType  ){    billing {      ...CustomerAddressFragment    }cartHashcartTaxcommentCountcommentStatuscouponLines {      ...OrderToCouponLineConnectionFragment    }createdViacurrencycustomer {      ...CustomerFragment    }customerIpAddresscustomerNotecustomerUserAgentdatabaseIddatedateCompleteddatePaiddiscountTaxdiscountTotaldownloadableItems {      ...OrderToDownloadableItemConnectionFragment    }feeLines {      ...OrderToFeeLineConnectionFragment    }hasBillingAddresshasDownloadableItemhasShippingAddressidisDownloadPermittedlineItems {      ...OrderToLineItemConnectionFragment    }metaData {      ...MetaDataFragment    }modifiedneedsPaymentneedsProcessingneedsShippingAddressorderKeyorderNotes {      ...OrderToCommentConnectionFragment    }orderNumberorderVersionparent {      ...OrderFragment    }paymentMethodpaymentMethodTitlepricesIncludeTaxrefunds {      ...OrderToRefundConnectionFragment    }shipping {      ...CustomerAddressFragment    }shippingAddressMapUrlshippingLines {      ...OrderToShippingLineConnectionFragment    }shippingTaxshippingTotalstatussubscriptions {      ...SubscriptionFragment    }subtotaltaxLines {      ...OrderToTaxLineConnectionFragment    }totaltotalTaxtransactionId  }}
Variables
{"id":4,"idType":"DATABASE_ID"}
Response
{"data":{"order":{"billing":CustomerAddress,"cartHash":"xyz789","cartTax":"xyz789","commentCount":987,"commentStatus":"abc123","couponLines":OrderToCouponLineConnection,"createdVia":"abc123","currency":"abc123","customer":Customer,"customerIpAddress":"xyz789","customerNote":"abc123","customerUserAgent":"xyz789","databaseId":123,"date":"xyz789","dateCompleted":"abc123","datePaid":"xyz789","discountTax":"abc123","discountTotal":"xyz789","downloadableItems":OrderToDownloadableItemConnection,"feeLines":OrderToFeeLineConnection,"hasBillingAddress":true,"hasDownloadableItem":false,"hasShippingAddress":true,"id":4,"isDownloadPermitted":false,"lineItems":OrderToLineItemConnection,"metaData":[MetaData],"modified":"xyz789","needsPayment":true,"needsProcessing":true,"needsShippingAddress":false,"orderKey":"xyz789","orderNotes":OrderToCommentConnection,"orderNumber":"xyz789","orderVersion":"xyz789","parent":Order,"paymentMethod":"xyz789","paymentMethodTitle":"abc123","pricesIncludeTax":true,"refunds":OrderToRefundConnection,"shipping":CustomerAddress,"shippingAddressMapUrl":"xyz789","shippingLines":OrderToShippingLineConnection,"shippingTax":"xyz789","shippingTotal":"xyz789","status":"CANCELLED","subscriptions":[Subscription],"subtotal":"xyz789","taxLines":OrderToTaxLineConnection,"total":"xyz789","totalTax":"xyz789","transactionId":"abc123"}}}
©  2021-2023WPGraphQL WooCommerce.All rights reserved.