woocommerce/includes/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
..
Controllers Fix the REST API entry point to add coupons to an order. 2021-03-24 15:19:34 +01:00
Utilities Change __wakeup() to a public method to avoid PHP8 warning. 2020-09-18 07:55:26 +00:00
Package.php Fixed usage of package tag in REST API and templates 2020-09-17 11:56:08 -03:00
Server.php Fixed usage of package tag in REST API and templates 2020-09-17 11:56:08 -03:00