woocommerce/tests/legacy/unit-tests/rest-api
Nestor Soriano 2b8cac7cf2 Fix the REST API entry point to add coupons to an order.
- Check input (no 'id', has 'code') and throw an error if needed
  before removing the existing coupons, so an invalid input
  won't cause the loss of these existing coupons.
- Also, check that the coupon is actually valid as part of the
  input check.
- Cache the coupon objects that are created during the input check,
  and apply them directly.
- Don't check if 'coupon_lines' is an array and contains arrays,
  that's already done by the REST API engine by looking at the schema.
- Adjust unit tests.
2021-03-24 15:19:34 +01:00
..
Helpers Replaced the deprecated `WC_Admin_Note` class 2020-11-12 13:26:30 -08:00
Tests Fix the REST API entry point to add coupons to an order. 2021-03-24 15:19:34 +01:00
data Make api included structure more linear. 2020-08-06 14:34:02 +05:30
AbstractRestApiTest.php Fixed package tag 2020-09-17 14:34:36 -03:00