To be more specific, to add a coupon code to an order we execute a PUT on the below endpoint with the below JSON payload:
Endpoint:
/wp-json/wc/v3/orders/<id>
Payload:
{“coupon_lines”:[{“code”:”[coupon code]”}]}
The error we receive when the Advanced Coupons for WooCommerce plugin is enabled is:
{
"code": "internal_server_error",
"message": "<p>There has been a critical error on this website.</p><p><a href=\"https://www.ads-software.com/support/article/faq-troubleshooting/\">Learn more about troubleshooting WordPress.</a></p>",
"data": {
"status": 500
},
"additional_errors": []
}