Commit Graph

69 Commits

Author SHA1 Message Date
Claudio Sanches 48bf608120 [API] Improved the params in orders api actions 2014-12-12 01:22:42 -02:00
Claudio Sanches 051d3078ad [API] Prevented errors with deleted products in the orders endpoint, closes #6813 2014-12-11 10:54:07 -02:00
Mike Jolley eba8206540 Merge branch 'tax-coupon-handling' Closes #6830
Conflicts:
	assets/js/admin/meta-boxes-order.min.js
	includes/api/class-wc-api-coupons.php
	includes/class-wc-cart.php
	templates/checkout/review-order.php
2014-12-03 12:33:15 +00:00
claudiosmweb 80ea5420c3 [API] Fixed the action parameters in the methods to create and edit orders, closes #6845 2014-11-28 10:22:35 -02:00
Mike Jolley 3c82331a8b Store discount 'tax' to show discounts on prices including tax more accuratly
Also deprecated some functions named after having 2 levels of discounts.
2014-11-25 13:05:03 +00:00
Mike Jolley 4a8c541fbf Remove 'order' discounts from classes 2014-11-25 11:05:14 +00:00
claudiosmweb 8eeb6fc204 Removed more some unused code 2014-11-19 22:43:09 -02:00
Mike Jolley 9701dad114 API - set_fee should support tax_data
Closes #6719 cc @maxrice
2014-11-14 13:14:48 +00:00
Aaron 0b557e175e Fixed API create_order to allow setting line totals.
$order->add_product expects totals without the `line_` prefix. See https://github.com/woothemes/woocommerce/blob/master/includes/abstracts/abstract-wc-order.php#L149

Without this, setting product coupons doesn't work correctly. (The coupon is saved to the order but no discounts are added to the product.)
2014-10-16 13:56:08 +03:00
shivapoudel e6f6bcf368 Absolute path fix for REST API v2 2014-09-21 01:09:20 +05:45
Max Rice 445aaa78f9 Use `note` for creating/updating order with customer note
Fixes #6255
2014-09-15 14:44:11 -04:00
Mike Jolley c4ef86d44e scrutinizer patches 2014-09-08 00:37:55 +01:00
Max Rice 28536f6bd8 REST API: allow adding/updating order meta
When creating or updating orders, non-protected scalar meta can now be
set.
2014-08-30 16:17:52 -04:00
Max Rice ee8bf5bf18 REST API: tweak filter name from #6084 2014-08-30 16:16:51 -04:00
Max Rice e1a542498d Fix notice introduced in #6084 2014-08-30 15:14:59 -04:00
Max Rice 722f888453 REST API: Add field restriction to new endpoints 2014-08-30 15:05:36 -04:00
Max Rice ec0f92878e REST API: Add order statuses endpoint 2014-08-30 15:05:31 -04:00
Florian Ludwig 3fadc14085 Reduce confusion on using the all_meta filter 2014-08-23 19:07:10 +02:00
Florian Ludwig 82f53037be Implemented more general filter array 2014-08-23 00:11:03 +02:00
Florian Ludwig 526b677bcf Extend REST API to access also hidden order item meta 2014-08-22 21:42:28 +02:00
Barry Kooij 94365791af Changed all use of get_product to wc_get_product 2014-08-19 12:09:29 +02:00
claudiosmweb 4acb90def2 changed api_refund for true 2014-08-18 10:47:56 -03:00
claudiosmweb 288732a4be added refund amount validation 2014-08-18 10:47:24 -03:00
claudiosmweb 924e0f92c5 updated woocommerce_api_order_refunds_response filter params 2014-08-18 10:42:37 -03:00
claudiosmweb 2bbcea9de2 orders API for refunds now accepts the api_refund param 2014-08-15 15:58:55 -03:00
claudiosmweb 1294696fcf created API method for delete order refunds 2014-08-15 15:38:39 -03:00
claudiosmweb 6d4ea6e54e created initial API method for edit order refunds 2014-08-15 15:28:43 -03:00
claudiosmweb d02a803e83 added API method for create an order refund 2014-08-15 14:54:19 -03:00
claudiosmweb b972494ac8 created method API to get individual order refunds 2014-08-15 14:40:34 -03:00
claudiosmweb f9250fecf2 created API for get order refunds 2014-08-15 14:09:33 -03:00
Barry Kooij 6655188f0b Changed use of get_order with wc_get_order 2014-08-15 14:29:21 +02:00
claudiosmweb 9da4f13805 fixed the orders api order status query 2014-08-12 15:08:11 -03:00
Mike Jolley ae6dceeace Merge pull request #5908 from maxrice/fix-issue-5423
Add item meta to REST API orders response
2014-07-29 13:19:38 +01:00
Max Rice 76be03010c Improve order notes endpoint
This commit improves the order notes endpoint with full read/write
capabilities:

* GET /orders/#{order_id}/notes - get all notes for an order
* GET /orders/#{order_id}/notes/#{id} - get single order note
* POST /orders/#{order_id}/notes - create an order note
* PUT /orders/#{order_id}/notes/#{id} - edit an order note
* DELETE /orders/#{order_id}/notes/#{id} - delete an order note
2014-07-28 23:39:07 -04:00
Max Rice 7d597a36d0 Add item meta to REST API orders response
Fixes #5423
2014-07-28 13:33:03 -04:00
Max Rice 698f6499f6 Add REST API create/edit order actions & filters
Part of #4160
2014-07-27 23:58:01 -04:00
Max Rice 5be324a543 Add edit order REST API method
Part of #4160
2014-07-27 23:36:32 -04:00
Max Rice 315787e3d6 Refactor create order method
* handle errors through WC_API_Exception
* abstract order item creation

Part of #4160
2014-07-27 23:35:50 -04:00
Max Rice d919ed9d64 Tweak REST API order response
* se WC_Order::get_order_currency() for currency
* use new WC_Order::get_subtotal() for subtotal
* add order item ID and rate ID to tax lines

Part of #4160
2014-07-27 23:33:35 -04:00
Max Rice 95aab694e4 API: implement order creation
part of #4160
2014-07-12 21:44:49 -04:00
Max Rice 13e2495390 API: implement order deletion
part of #4160
2014-07-12 18:09:21 -04:00
Coen Jacobs 89ea6c46ab Replace new WC_Order calls with get_order 2014-06-13 15:24:51 +02:00
Mike Jolley e0a74fffc4 implement is_status() 2014-05-30 17:43:21 +01:00
Mike Jolley ae50495dfd Update API functions 2014-05-30 16:34:59 +01:00
Paul Kilmurray b7a8a0bd20 Update class-wc-api-orders.php
The line_subtotal_tax should be included in the line_items. It doesn't seem to have a helper method like the others?
2014-05-22 13:34:39 +08:00
Max Rice a007f2e8d7 Fix fee/coupon lines typo in REST API order response 2014-05-02 15:26:30 -04:00
Max Rice 0b2cc1df28 Fix potential fatal error when fetching orders via API 2014-01-30 15:41:21 -05:00
Max Rice 8b6145691c API: Add item price to order line items response 2014-01-13 22:14:08 -05:00
Max Rice b6dbaebe01 API: Add subtotal to orders response 2014-01-13 22:13:48 -05:00
Max Rice 497ec8186e Fix remove filter typo 2014-01-13 22:13:37 -05:00