Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] PUT /orders with incorrect coupon format removes coupons #21

NielsdeBlaauw opened this issue Aug 8, 2019 · 1 comment


Copy link

@NielsdeBlaauw NielsdeBlaauw commented Aug 8, 2019

Describe the bug
When using the API to update (PUT) an order, sending back the 'coupon_lines' we got from the API during theGET call removes all set coupons on the order.

The (API documentation)[] doesn't specify this behaviour, or the correct way to deliver the coupon_line property.

To Reproduce
Steps to reproduce the behavior:

  1. Create a coupon.
  2. Create an order using the coupon using the store or admin interface (note, coupon has been correctly added to the order).
  3. GET the order via the API.
  4. PUT the response from the GET via the API.
  5. Note the coupon has disappeared in the admin interface, and totals have been recalculated.

Expected behavior
I expect the coupon to remain on the order. Otherwise I would expect the API to error (400 Bad Request). Or the current behaviour to be documented, with the correct format to update/change coupon_lines added.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

@claudiosanches claudiosanches transferred this issue from woocommerce/woocommerce Aug 12, 2019

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Aug 12, 2019

Issue-Label Bot is automatically applying the label type: bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the type: bug label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.