Commit 26a622b9c38 for woocommerce

commit 26a622b9c383eb2a733312745c0ad63175c4cb1c
Author: Luigi Teschio <gigitux@gmail.com>
Date:   Wed Sep 23 11:13:36 2026 +0200

    Document removing coupons from orders through the REST API (#68971)

    Document REST API order coupon removal

diff --git a/docs/apis/rest-api/v3/coupons.mdx b/docs/apis/rest-api/v3/coupons.mdx
index 35d06e3367b..2afef617f7b 100644
--- a/docs/apis/rest-api/v3/coupons.mdx
+++ b/docs/apis/rest-api/v3/coupons.mdx
@@ -586,6 +586,8 @@ woocommerce.put("coupons/719", data).parsed_response

 This API helps you delete a coupon.

+To remove an applied coupon from an order without deleting the coupon itself, [update the order's coupon lines](../orders#remove-a-coupon-from-an-order).
+
 ```http
 DELETE /wp-json/wc/v3/coupons/<id>
 ```
diff --git a/docs/apis/rest-api/v3/orders.mdx b/docs/apis/rest-api/v3/orders.mdx
index e3ef9a3d544..ffd1dc31b1f 100644
--- a/docs/apis/rest-api/v3/orders.mdx
+++ b/docs/apis/rest-api/v3/orders.mdx
@@ -1509,6 +1509,19 @@ woocommerce.put("orders/727", data).parsed_response
   </TabItem>
 </Tabs>

+### Remove a coupon from an order
+
+To remove an applied coupon, update the order with a `coupon_lines` array containing every coupon code that should remain. Any applied coupon omitted from the array is removed from the order. For example, if the order has `10per` and `20off`, this request removes `20off`:
+
+```shell
+curl -X PUT https://example.com/wp-json/wc/v3/orders/727 \
+	-u consumer_key:consumer_secret \
+	-H "Content-Type: application/json" \
+	-d '{"coupon_lines":[{"code":"10per"}]}'
+```
+
+To remove all applied coupons, send `{"coupon_lines":[]}`. Coupon line IDs are read-only; do not send an ID with a null code to remove a coupon. This changes the coupons applied to the order, not the coupon codes available in the store.
+
 ## Delete an order

 This API helps you delete an order.