ADO.NET Provider for WooCommerce

Build 25.0.9434

SubscriptionCouponLines

Retrieves all subscription coupon lines. 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 SubscriptionCouponLines view. All other filters are applied client-side. The following columns support server-side filtering with the specified operators:

  • SubscriptionId supports the '=' operator.
  • ParentId supports the '=', '!=', 'IN', and 'NOT IN' operators.
  • CustomerId supports the '=' operator.
  • Status supports the '=' operator.
  • Product supports the '=' operator.

The following examples demonstrate basic queries using supported filters:

-- Query by subscription ID
SELECT * FROM SubscriptionCouponLines WHERE SubscriptionId = 4

-- Query by parent subscription
SELECT * FROM SubscriptionCouponLines WHERE ParentId = 4

-- Query excluding a parent subscription
SELECT * FROM SubscriptionCouponLines WHERE ParentId != 4

-- Query using a list of parent subscriptions
SELECT * FROM SubscriptionCouponLines WHERE ParentId IN (4, 5)

-- Query excluding a list of parent subscriptions
SELECT * FROM SubscriptionCouponLines WHERE ParentId NOT IN (4, 5)

-- Filter by subscription status and customer
SELECT * FROM SubscriptionCouponLines WHERE Status = 'pending' AND CustomerId = 501

-- Filter by product
SELECT * FROM SubscriptionCouponLines WHERE Product = 101

Columns

Name Type References Description
Id [KEY] Integer Item ID.
SubscriptionId Integer

Subscriptions.Id

Subscription ID.
Code String Coupon code.
MetaData String Meta data.
Discount String Discount total.
DiscountTax String Discount total tax.
ParentId Integer Parent/initial order ID for the subscription.
CustomerId Integer

Customers.Id

User ID who owns the subscription.
Status String Subscription status.

デフォルト値はpendingです。

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

Name Type Description
Product String Limit result set to subscriptions assigned a specific product ID.
ReferenceNumber String This column will be used in Bulk operations to get specific values from the Temp tables.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434