woocommerce / wc-api-node

This client is obsolete and will no longer receive updates, a new JavaScript library is available under the name of @woocommerce/woocommerce-rest-api
https://www.npmjs.com/package/woocommerce-api
MIT License
144 stars 63 forks source link

Remove coupon or fee in Order #101

Closed JMalaval closed 5 years ago

JMalaval commented 5 years ago

Hi,

I need to remove a coupon or a fee in my Order with Rest API and I can't find how do this . I try this to set fee_lines to null but it just do nothing

let order = {
    fee_lines: null
};

woocommercePlugin.putAsync('orders/10' , order)
let order = {
    fee_lines: []
};

woocommercePlugin.putAsync('orders/10' , order)

How can I delete a fee/coupon in an order if i can't update it to null or something like that ?

Thanks You very much :)

claudiosanches commented 5 years ago

This library is now deprecated, you should try https://github.com/woocommerce/woocommerce-rest-api-js-lib