SubscriptionNotes
Retrieves all subscription notes. This table shows data only if the WooCommerce Subscriptions Plugin is enabled.
Table Specific Information
Select
WooCommerce supports server-side filtering only on a limited set of columns in the SubscriptionNotes table. All other filters are applied client-side. The following columns support server-side filtering with the specified operators:
- Id supports the '=' operator.
- SubscriptionId supports the '=' operator.
If the SubscriptionId filter is not specified, the server retrieves all subscriptions and performs an individual request for each related note. This can result in significantly slower queries.
The following example demonstrates a basic query with both filters:
-- Query a specific subscription note by ID and subscription
SELECT * FROM SubscriptionNotes WHERE Id = 4 AND SubscriptionId = 10
INSERT
The following columns are required when inserting records into the SubscriptionNotes table: SubscriptionId and Note.
-- Add a new note to a subscription
INSERT INTO SubscriptionNotes (Note, SubscriptionId)
VALUES ('qwewq', 94)
Update
Update operations are not supported for the SubscriptionNotes table.
Delete
The following example demonstrates a basic delete operation using both columns:
-- Delete a note from a specific subscription
DELETE FROM SubscriptionNotes WHERE Id = 25 AND SubscriptionId = 45
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
Unique identifier for the resource. | |
| SubscriptionId [KEY] | Integer | False |
Subscription ID. | |
| AddedByUser | Boolean | False |
If true, the note is attributed to the current user. If false, it is attributed to the system. The default value is false. | |
| Author | String | True |
Subscription note author. | |
| CustomerNote | Boolean | False |
If true, the note is shown to customers and they are notified. If false, the note is for admin reference only. The default value is false. | |
| DateCreated | Datetime | True |
The date the subscription note was created, in the site's timezone. | |
| DateCreatedGmt | Datetime | True |
The date the subscription note was created, as GMT. | |
| Note | String | False |
Subscription note. |