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. Following columns are supported server side, all other columns are processed client side. If the 'OrderId' filter is not specified, the server will fetch a list of all the orders and perform a request for each order in the list.
- OrderId supports '=,IN' operators.
- Id supports the '=,IN,NOT IN' operators.
- DateCreated supports the '>,<,>=,<=,=' operators.
SELECT * FROM OrderRefunds WHERE OrderId = 21 SELECT * FROM OrderRefunds WHERE Id = 21 SELECT * FROM OrderRefunds WHERE Id IN (21,22) SELECT * FROM OrderRefunds WHERE Id NOT IN (21,22) Select * from OrderRefunds where DateCreated < '2024-08-22 08:47:21.0'
Insert
The following attribute is required when performing an insert: OrderId.
INSERT INTO OrderRefunds (OrderId) VALUES (33)
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | 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. | |
| TaxLinesAggregate | String | True |
Tax lines data. See Order - Tax lines properties read-only | |
| ShippingLinesAggregate | String | False |
Shipping lines data. See Order - Shipping lines properties | |
| FeeLinesAggregate | String | False |
Fee lines data. See Order - Fee lines properties | |
| OrderId [KEY] | String | False |
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. |