SubscriptionOrders
Retrieves all subscription orders. This view shows data only if the WooCommerce Subscriptions Plugin is enabled.
View-Specific Information
Select
WooCommerce supports server-side filtering only on a limited set of columns in the SubscriptionShippingLines view. All other filters are applied client-side. The following column supports server-side filtering with the specified operator:
- SubscriptionId supports the '=' operator.
The following example demonstrates a basic query using a supported filter:
-- Query shipping lines for a specific subscription
SELECT * FROM SubscriptionShippingLines WHERE SubscriptionId = 4
Columns
| Name | Type | References | Description |
| Id [KEY] | Integer | Unique identifier for the resource. | |
| SubscriptionId | Integer | Subscription ID. | |
| BillingAddress1 | String | Billing Address line 1. | |
| BillingAddress2 | String | Billing Address line 2. | |
| BillingCity | String | Billing City name. | |
| BillingCompany | String | Billing Company name. | |
| BillingCountry | String | Billing Country code in ISO 3166-1 alpha-2 format. | |
| BillingEmail | String | Billing Email address. | |
| BillingFirstName | String | Billing First name. | |
| BillingLastName | String | Billing Last name. | |
| BillingPhone | String | Billing Phone number. | |
| BillingPostcode | String | Billing Postal code. | |
| BillingState | String | ISO code or name of the state, province or district. | |
| CartHash | String | MD5 hash of cart items to ensure orders are not modified. | |
| CartTax | String | Sum of line item taxes only. | |
| CouponLines | String | Coupons line data. | |
| CreatedVia | String | Shows where the order was created. | |
| Currency | String | Currency used to create the order, in ISO format (such as USD). Defaults to the current store currency. | |
| CustomerId | Integer | User ID who owns the order. Use 0 for guests. Default is 0. | |
| CustomerIpAddress | String | Customer's IP address. | |
| CustomerNote | String | Note left by customer during checkout. | |
| CustomerUserAgent | String | User agent of the customer. | |
| DateCompleted | Datetime | The date the order was completed, in the site's timezone. | |
| DateCompletedGmt | Datetime | The date the order was completed, as GMT. | |
| DateCreated | Datetime | The date the order was created, in the site's timezone. | |
| DateCreatedGmt | Datetime | The date the order was created, as GMT. | |
| DateModified | Datetime | The date the order was last modified, in the site's timezone. | |
| DateModifiedGmt | Datetime | The date the order was modified, as GMT. | |
| DatePaid | Datetime | The date the order has been paid, in the site's timezone. | |
| DatePaidGmt | Datetime | The date the order was paid, as GMT. | |
| DiscountTax | String | Total discount tax amount for the order. | |
| DiscountTotal | String | Total discount amount for the order. | |
| FeeLines | String | Fee lines data. | |
| IsEditable | Boolean | Is editable. | |
| LineItems | String | Line items data. | |
| MetaData | String | Meta data. | |
| NeedsPayment | Boolean | Needs Payment. | |
| NeedsProcessing | Boolean | Needs Processing | |
| Number | String | The order's number. | |
| OrderKey | String | Order key. | |
| OrderType | String | Order type. | |
| ParentId | Integer | Parent order ID. | |
| PaymentMethod | String | Payment method ID. | |
| PaymentMethodTitle | String | Payment method title. | |
| PaymentUrl | String | Payment Url. | |
| PricesIncludeTax | Boolean | Shows if the prices included tax during checkout. | |
| ShippingAddress1 | String | Shipping Address line 1. | |
| ShippingAddress2 | String | Shipping Address line 2. | |
| ShippingCity | String | Shipping City name. | |
| ShippingCompany | String | Shipping Company name. | |
| ShippingCountry | String | Shipping Country code in ISO 3166-1 alpha-2 format. | |
| ShippingFirstName | String | Shipping First name. | |
| ShippingLastName | String | Shipping Last name. | |
| ShippingPhone | String | Shipping Phone | |
| ShippingPostcode | String | Shipping Postal code. | |
| ShippingState | String | ISO code or name of the state, province or district. | |
| ShippingLines | String | Shipping lines data. | |
| ShippingTax | String | Total shipping tax amount for the order. | |
| ShippingTotal | String | Total shipping amount for the order. | |
| Status | String | Order status.
The default value is pending. | |
| TaxLines | String | Tax lines data. | |
| Total | String | Grand total. | |
| TotalTax | String | Sum of all taxes. | |
| TransactionId | String | Unique transaction ID. | |
| Version | String | Version of WooCommerce when the order was made. |