woocommerce/tests/legacy
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
..
data Add unit test and a sample Woo plugin file 2020-05-01 22:47:08 +05:30
framework Add shipping, tax and fee lines to refund response for better information. 2020-11-11 18:47:48 +05:30
includes Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
unit-tests Fix the REST API entry point to add coupons to an order. 2021-03-24 15:19:34 +01:00
bootstrap.php Reintroduce the dependency injection related code. 2020-10-08 09:28:05 +02:00
classes-with-mockable-static-methods.php Code hacker resdesign for single-load of code files. 2020-06-02 19:06:53 +02:00
mockable-functions.php Add unit tests for the WC_Checkout class. 2021-02-08 15:49:38 +01:00