Claudio Sanches
d5524a62bf
[API] Removed test in WC_API_Orders::set_line_item()
2015-04-24 15:53:39 -03:00
Mike Jolley
30d2ab8af8
Avoid setting is_customer_note when 0
...
Closes #7995
2015-04-23 11:50:09 +01:00
Claudio Sanches
7ab0d01aa2
[API] Fixed create order method
2015-04-16 15:26:54 -03:00
Mike Jolley
d133d35e27
Fix conflict
2015-04-14 11:27:30 +01:00
Claudio Sanches
c06b6f13e3
[API] Improved the error messages when sent a empty object, closes #7914
2015-04-13 13:06:19 -03:00
Paul Kilmurray
c8d52c7c2d
Use wc_stock_amount format function
...
This allows the REST API to honour the `woocommerce_stock_amount` filter, eg: for decimal quantity values
2015-03-31 18:36:27 +08:00
Guillermo Gette
49f84a7bc6
get product_id using wc_get_product_id_by_sku
2015-03-18 23:11:28 +11:00
Guillermo Gette
b8578c044d
Merge branch 'master' of github.com:woothemes/woocommerce into create_order_with_product_sku
2015-03-18 23:06:02 +11:00
Mike Jolley
74d46dcc1e
Merge pull request #7455 from bryceadams/patch-7433
...
Proposed solution for api all order status counts
2015-03-18 10:57:34 +00:00
matttallan
4d0e0b71f3
Rollback WCAPI create_order if exception is thrown after wc_create_order
...
When you use the api to create an order and specify an method_id for
the payment details, but no method_title. You recieve a WP_Error as the
response but a pending order of $0 is still created.
2015-03-13 16:02:42 +10:00
Guillermo Gette
e9d20c9f66
update set_line_item to let you set items by sku
2015-03-12 22:52:37 +11:00
Barry Kooij
b5d64ba932
Decimal Precision can now be set in all orders API calls.
...
Fixes #7652
2015-03-09 19:07:02 +01:00
Bryce
a0b50541cc
Proposed solution for api all order status counts
...
I’m not sure if this is the best way or if it needs work. What do you
think @maxrice @claudiosmweb?
With `status` set to `any`, it returns:
```
stdClass Object
(
[count] => stdClass Object
(
[pending] => 0
[processing] => 2042
[on-hold] => 4
[completed] => 2993
[cancelled] => 13
[refunded] => 0
[failed] => 4
)
)
```
If not `any, same as before.
Closes #7433
2015-02-17 13:27:38 +07:00
Claudio Sanches
00916b9e29
Merge pull request #7303 from mattallan/matt/wc-api-orders-tweaks
...
WC_API_Orders: pass data var to new wrappable api function.
2015-02-05 06:46:34 -02:00
matttallan
6531eb0373
pass data var to wrappable api function.
2015-02-05 15:43:05 +10:00
Mike Jolley
6af80f8e60
Merge pull request #7280 from mattallan/matt/wc-api-orders-tweaks
...
Some more tweaks to WC API Orders
2015-02-04 11:46:33 +00:00
matttallan
e5c3385d3b
Change private wc-api method to protected.
...
Mainly so that it can be used in the new Subscriptions API :)
2015-02-04 11:38:38 +10:00
matttallan
f3fbbdeecc
Use validate_request() to avoid duplicate code.
2015-02-04 11:38:36 +10:00
matttallan
cd085f2adc
add an overrideable function to a create custom post.
...
Especially handy for WC Subscriptions seeing as they extend the Abstract
Order Class.
2015-02-04 11:16:11 +10:00
matttallan
c2520a528b
changes to avoid writing duplicated code
2015-02-04 09:59:02 +10:00
Claudio Sanches
5f63425e0a
[API] Fixed the deleted type for refunds
2015-01-26 19:39:33 -02:00
Claudio Sanches
cd88ac0d72
[API] Fixed the refunds returned data
2015-01-26 19:24:54 -02:00
Claudio Sanches
8ff08e70af
Fixed the WC_Abstract_Order::get_user_id() return type and fixed the orders customer_id
2015-01-26 14:41:19 -02:00
Claudio Sanches
4774646a0e
[API] Removed cart_discount, we have now only total_discount
2015-01-26 14:24:59 -02:00
Mike Jolley
3590bfb198
Standard tax class is empty. Fixes #7142
2015-01-19 11:30:30 +00:00
matttallan
5265e432b3
Change wc-api-order private methods to protected.
2015-01-15 11:28:07 +10:00
Claudio Sanches
e14a5b0624
[API] Refactored the orders endpoint to use the WC_API_Exception class #6138
2015-01-05 16:40:38 -02:00
Claudio Sanches
d880ee390b
Fixed some coding standards in orders api class
2015-01-05 15:41:14 -02:00
Max Rice
641a3aae42
[ #6910 ] Fix strict check for boolean
2015-01-02 14:30:47 -05:00
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