File tree 1 file changed +14
-13
lines changed
source/includes/wp-api-v3
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -72,14 +72,15 @@ curl -X POST https://example.com/wp-json/wc/v3/orders/723/refunds \
72
72
-u consumer_key:consumer_secret \
73
73
-H " Content-Type: application/json" \
74
74
-d ' {
75
+ "amount": "30",
75
76
"line_items": [
76
77
{
77
78
"id": "111",
78
- "refund_amount ": 10,
79
+ "refund_total ": 10,
79
80
"refund_tax": [
80
81
{
81
82
"id" "222",
82
- "refund_amount ": 20
83
+ "refund_total ": 20
83
84
}
84
85
]
85
86
}
@@ -88,15 +89,15 @@ curl -X POST https://example.com/wp-json/wc/v3/orders/723/refunds \
88
89
89
90
``` javascript
90
91
const data = {
91
- amount: 30 ,
92
+ amount: " 30 " ,
92
93
line_items: [
93
94
{
94
95
id: " 111" ,
95
- refund_amount : 10 ,
96
+ refund_total : 10 ,
96
97
refund_tax: [
97
98
{
98
99
id: " 222" ,
99
- refund_amount : 20
100
+ refund_total : 20
100
101
}
101
102
]
102
103
}
@@ -115,11 +116,11 @@ WooCommerce.post("orders/723/refunds", data)
115
116
``` php
116
117
<?php
117
118
$data = [
118
- 'amount' => 30 ,
119
+ 'amount' => '30' ,
119
120
'line_items' => [
120
121
[
121
122
'id' => '111',
122
- 'refund_amount ' => 10,
123
+ 'refund_total ' => 10,
123
124
'refund_tax' => [
124
125
[
125
126
'id' => '222',
@@ -136,15 +137,15 @@ print_r($woocommerce->post('orders/723/refunds', $data));
136
137
137
138
``` python
138
139
data = {
139
- " amount" : 30 ,
140
+ " amount" : " 30 " ,
140
141
" line_items" : [
141
142
{
142
143
" id" : " 111" ,
143
- " refund_amount " : 10 ,
144
+ " refund_total " : 10 ,
144
145
" refund_tax" : [
145
146
{
146
147
" id" " 222" ,
147
- " refund_amount " : 20
148
+ " refund_total " : 20
148
149
}
149
150
]
150
151
}
@@ -156,15 +157,15 @@ print(wcapi.post("orders/723/refunds", data).json())
156
157
157
158
``` ruby
158
159
data = {
159
- amount: 30 ,
160
+ amount: " 30 " ,
160
161
line_items: [
161
162
{
162
163
id: " 111" ,
163
- refund_amount : 10 ,
164
+ refund_total : 10 ,
164
165
refund_tax: [
165
166
{
166
167
id " 222" ,
167
- refund_amount : 20
168
+ refund_total : 20
168
169
}
169
170
]
170
171
}
You can’t perform that action at this time.
0 commit comments