Commit Graph

1004 Commits

Author SHA1 Message Date
Mike Jolley 047242515d Make API and CRUD use consistent keys and make use of data 2016-08-30 17:50:35 +01:00
Mike Jolley b82415dfa3 Handle exceptions in API 2016-08-30 15:57:45 +01:00
Mike Jolley 499e190efb Merge pull request #11785 from woothemes/coupon-exceptions
Coupon Exceptions and REST/CRUD improvements
2016-08-30 11:44:19 +01:00
Mike Jolley df35845d4d wc_get_coupon_id_by_code 2016-08-30 11:43:53 +01:00
Justin Shreve de4296dd15 Add some missing API pieces:
* Value was missing from the settings schema (but was still present in the response).
* Added delete endpoint for shipping zones.
* Corrected permissions check/error for shipping zone methods.
2016-08-29 10:22:29 -07:00
Mike Jolley 8eef062079 Merge pull request #11781 from woothemes/shipping-method-api
Shipping Methods API
2016-08-26 16:51:55 +01:00
Mike Jolley b0672a000a Fixed unit tests 2016-08-26 16:44:00 +01:00
Mike Jolley 7d8bacc2b3 Missing $wpdb 2016-08-26 16:15:18 +01:00
Mike Jolley f034e1f69d Exception handling and REST optimisation 2016-08-26 15:42:42 +01:00
Mike Jolley 3ff41ceea4 No need to add meta since CRUD handles this 2016-08-26 15:26:05 +01:00
Mike Jolley 5c40236d79 Fixes notices 2016-08-26 15:24:01 +01:00
Mike Jolley ed01282340 Made data match schema 2016-08-26 15:20:44 +01:00
Justin Shreve 849a208e54 Fix issues based on feedback. Make sure to use WC_Shipping_Zone's methods when avaiable, fix up some coding standards, and add a new delete_shipping_method to WC_Shipping_Zone 2016-08-26 04:57:30 -07:00
Mike Jolley 6b6c856cc7 Filter the template path
Closes #11774
2016-08-26 11:03:08 +01:00
Justin Shreve 147c18c197 Add the ability to update/create/delete shipping method instances 2016-08-25 20:34:26 -07:00
Justin Shreve 3ceb189118 Add GET /shipping_methods and GET /shipping_methods/METHOD_ID
Also adds tests.
2016-08-25 11:48:17 -07:00
Mike Jolley 077f57f139 Merge branch 'master' into WC_Data_Exception 2016-08-25 11:03:14 +01:00
Claudio Sanches 16e386c873 Merge pull request #11757 from woothemes/get-coupon-code-by-id
Get coupon code by
2016-08-24 14:18:23 -03:00
Mike Jolley cde78abed3 Working on catching errors 2016-08-24 15:26:35 +01:00
Mike Jolley d9798f7226 Set reading to prevent exceptions during DB load 2016-08-24 14:37:19 +01:00
Claudio Sanches c8726cc42b Fixed method return value in write context
cc @justinshreve
2016-08-24 01:50:12 -03:00
Claudio Sanches 3633960165 Removed dead global variables 2016-08-23 20:02:38 -03:00
Claudio Sanches 00b2e43250 DRY 2016-08-23 20:00:30 -03:00
Claudio Sanches 5e069a4f4e Merge pull request #11756 from woothemes/update/coupon-api-crud
Update Coupon API to use CRUD
2016-08-23 19:51:27 -03:00
Justin Shreve 77088a4a22 Coupon ID will also be an integer, so we can switch the prepare statement to expect that 2016-08-23 13:55:21 -07:00
Mike Jolley 3e3e35d50d Add set prop/get prop helper, error handler, and validation to item product class 2016-08-23 14:58:44 +01:00
corsonr f430c23cdc fix issue 11751 2016-08-23 11:16:38 +02:00
Justin Shreve a243829db6 Convert Coupon Controller to use CRUD operations 2016-08-22 15:06:21 -07:00
Justin Shreve 7da590e422 Coupon Tests:
* Move tests for legacy endpoints to a legacy test folder.
* Create a test class to test the WC-API coupons endpoint.
2016-08-22 13:50:32 -07:00
Claudio Sanches eb55096a32 Allow oAuth1.0a authentication using headers 2016-08-22 17:39:41 -03:00
Claudio Sanches 38e1be71eb ID first for all elements in the REST API
cc @mikejolley
2016-08-22 16:58:34 -03:00
Claudio Sanches 0da91bb7d7 Merge pull request #11746 from woothemes/crud-meta-id
Swaps meta_id for id across crud and api
2016-08-22 16:43:57 -03:00
Mike Jolley f34f1aa635 Simplify prepare_line_items logic 2016-08-22 19:58:30 +01:00
Mike Jolley 39f4a1cdca Swaps meta_id for id across crud and api 2016-08-22 19:37:34 +01:00
Mike Jolley 3d696266d2 Set_address 2016-08-22 17:03:59 +01:00
Mike Jolley 7cf75f5085 Remove use of deprecated functions 2016-08-22 16:57:54 +01:00
Mike Jolley c88984eb0e Replace add methods 2016-08-22 16:48:19 +01:00
Mike Jolley 09e43cf797 read only refunded by 2016-08-22 13:15:15 +01:00
Mike Jolley fdd7e797ba API get refunds 2016-08-22 13:15:15 +01:00
Mike Jolley 9e45927803 Create refund with crud 2016-08-22 13:15:15 +01:00
Claudio Sanches 8fe4c14e78 [REST API] Fixed customer last order data 2016-08-20 14:29:48 -03:00
Claudio Sanches 80ee7016f8 Fixed conflicts 2016-08-19 20:31:59 -03:00
Mike Jolley 3f4ffe8a49 More crud updates 2016-08-19 17:05:47 +01:00
Mike Jolley 190cd0bf86 Remove direct access of item props in admin 2016-08-19 15:08:00 +01:00
Claudio Sanches d60d3d5b1e Merge branch 'order-crud-api' 2016-08-19 02:07:10 -03:00
Claudio Sanches acd8a70a30 [2.6] [REST API] Allow save refund reason, closes #11718 2016-08-18 15:20:52 -03:00
Mike Jolley 03110e755f Unit tests 2016-08-18 17:24:44 +01:00
Mike Jolley f1e517130a Feedback from @claudiosmweb 2016-08-18 13:30:10 +01:00
Claudio Sanches 74484c7009 [2.6] [REST API] Fixed undefined order ID, closes #11707 2016-08-18 00:41:46 -03:00
Mike Jolley 7852eecb06 Fix get param usage 2016-08-17 17:25:29 +01:00