Schema Documentation

Subscription

Description

A order object

Fields
Field NameDescription
canRenewEarly - Boolean If a user can renew an active subscription early.
billing - CustomerAddress Order billing properties
billingInterval - String Subscription billing interval.
billingPeriod - String Subscription billing length.
cancelledDate - String The subscription's cancelled date
cartHash - String Cart hash
cartTax - String Cart tax amount
Arguments
format - PricingFieldFormatEnum

Format of the price

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 - SubscriptionToCouponLineConnection Connection between the Subscription type and the CouponLine type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

createdVia - String Where the subscription was created.
currency - String Currency the subscription was created with, in ISO format
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
format - PricingFieldFormatEnum

Format of the price

discountTotal - String Discount total amount
Arguments
format - PricingFieldFormatEnum

Format of the price

downloadableItems - SubscriptionToDownloadableItemConnection Connection between the Subscription type and the DownloadableItem type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - SubscriptionToDownloadableItemConnectionWhereArgs

Arguments for filtering the connection

endDate - String The subscription's end date.
feeLines - SubscriptionToFeeLineConnection Connection between the Subscription type and the FeeLine type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

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
lastPaymentDate - String The subscription's last payment date
lineItems - SubscriptionToLineItemsConnection Connection between the Subscription type and the LineItem type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

metaData - [MetaData] Object meta data
Arguments
key - String

Retrieve meta by key

keysIn - [String]

Retrieve multiple metas by key

multiple - Boolean

Retrieve meta with matching keys

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
nextPaymentDate - String The subscription's next payment date
orderKey - String Order key
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?
removedLineItems - SubscriptionToLineItemConnection Connection between the Subscription type and the LineItem type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

requiresManualRenewal - Boolean Does subscription require the subscriber to renew the subscription manually?
resubscribedFrom - Subscription The subscription before this one.
resubscribedSubscription - Subscription The resubscription after this subscription.
shipping - CustomerAddress Order shipping properties
shippingAddressMapUrl - String Order customer
shippingLines - SubscriptionToShippingLineConnection Connection between the Subscription type and the ShippingLine type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

shippingTax - String Shipping tax amount
Arguments
format - PricingFieldFormatEnum

Format of the price

shippingTotal - String Shipping total amount
Arguments
format - PricingFieldFormatEnum

Format of the price

startDate - String The subscription's start date
status - SubscriptionStatusesEnum Order status
subtotal - String Order subtotal
Arguments
format - PricingFieldFormatEnum

Format of the price

taxLines - SubscriptionToTaxLineConnection Connection between the Subscription type and the TaxLine type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

total - String Order grand total
Arguments
format - PricingFieldFormatEnum

Format of the price

totalTax - String Order taxes
Arguments
format - PricingFieldFormatEnum

Format of the price

transactionId - String Transaction ID
trialDate - String The subscription's trial date
Example
{"canRenewEarly":true,"billing":CustomerAddress,"billingInterval":"xyz789","billingPeriod":"xyz789","cancelledDate":"abc123","cartHash":"xyz789","cartTax":"xyz789","commentCount":123,"commentStatus":"xyz789","couponLines":SubscriptionToCouponLineConnection,"createdVia":"abc123","currency":"xyz789","customer":Customer,"customerIpAddress":"abc123","customerNote":"abc123","customerUserAgent":"abc123","databaseId":987,"date":"xyz789","dateCompleted":"abc123","datePaid":"abc123","discountTax":"abc123","discountTotal":"xyz789","downloadableItems":SubscriptionToDownloadableItemConnection,"endDate":"abc123","feeLines":SubscriptionToFeeLineConnection,"hasBillingAddress":false,"hasDownloadableItem":false,"hasShippingAddress":false,"id":4,"isDownloadPermitted":false,"lastPaymentDate":"xyz789","lineItems":SubscriptionToLineItemsConnection,"metaData":[MetaData],"modified":"abc123","needsPayment":true,"needsProcessing":false,"needsShippingAddress":false,"nextPaymentDate":"xyz789","orderKey":"abc123","orderNumber":"abc123","orderVersion":"xyz789","parent":Order,"paymentMethod":"abc123","paymentMethodTitle":"xyz789","pricesIncludeTax":false,"removedLineItems":SubscriptionToLineItemConnection,"requiresManualRenewal":true,"resubscribedFrom":Subscription,"resubscribedSubscription":Subscription,"shipping":CustomerAddress,"shippingAddressMapUrl":"abc123","shippingLines":SubscriptionToShippingLineConnection,"shippingTax":"abc123","shippingTotal":"xyz789","startDate":"xyz789","status":"ACTIVE","subtotal":"xyz789","taxLines":SubscriptionToTaxLineConnection,"total":"abc123","totalTax":"xyz789","transactionId":"xyz789","trialDate":"abc123"}