OrderRefunds
Retrieve and modify order refunds.
Table Specific Information
Select
WooCommerce allows only a small subset of columns to be used in the WHERE clause of a SELECT query.
These columns support only the = comparison, unless stated otherwise. The available column for this
table is: OrderId. All other columns are processed client side. If the 'OrderId' filter is not specified,
the add-in will fetch a list of all the orders and perform a request for each order in the list.
SELECT * FROM OrderRefunds WHERE OrderId = 21
Insert
The following attribute is required when performing an insert: OrderId.
INSERT INTO OrderRefunds (OrderId) VALUES (33)
Columns
Name | Type | ReadOnly | References | Description |
Id | Long | False |
Unique identifier for the resource. | |
DateCreated | Datetime | True |
The date the order refund was created, in the site's timezone. | |
Amount | String | False |
Refund amount. | |
Reason | String | False |
Reason for refund. | |
RefundedBy | Long | False |
User ID of user who created the refund. | |
RefundedPayment | Boolean | True |
If the payment was refunded via the API. See api_refund. | |
LineItems | String | False |
Line items data. See Order refund - Line items properties | |
ApiRefund | Boolean | False |
When true, the payment gateway API is used to generate the refund. Defaults to true. write-only | |
Metadata | String | True |
Meta data. See OrderRefunds - Meta data properties. | |
OrderId | String | True |
Orders.Id |
Id of the order. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
ReferenceNumber | String |
This column will be used in Bulk operations to get specific values from the Temp tables. |
ApiRestock | Boolean |
When true, the selected line items are restocked. Default is true. |