It is not possible to remove fee_line for orders using the API.
For the line_items it is possible to set quantity to 0 or product_id to null, but that is not possible with fee_lines. I tried to set the whole value of fee_lines to null which did not remove anything and also changing total of order to 0 & remove name did not work.
Endpoint: wp-json/wc/v3/orders/632
Method: PUT
Data:
{
"fee_lines": [{ "id": "743", "name": "I cannot be deleted :-/", "total": 0 }],
"line_items": [{ "id": "362", "name": "I can be deleted! :-)", "quantity": 0}]
}
Setting "name" to null doesn't work. The following error is returned:
{"code":"woocommerce_rest_invalid_fee_item","message":"Fee name is required.","data":{"status":400}}
It is not possible to remove fee_line for orders using the API.
For the line_items it is possible to set quantity to 0 or product_id to null, but that is not possible with fee_lines. I tried to set the whole value of fee_lines to null which did not remove anything and also changing total of order to 0 & remove name did not work.
Endpoint: wp-json/wc/v3/orders/632 Method: PUT Data:
Setting "name" to null doesn't work. The following error is returned:
This is a duplicate of #178, but that was closed.